Re: online reindex

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: online reindex
Дата
Msg-id 28656.1045424701@sss.pgh.pa.us
обсуждение исходный текст
Ответ на online reindex  (Greg Stark <gsstark@mit.edu>)
Ответы Re: online reindex  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> If reindex sets a flag that causes all new inserts and updates to allocate new
> space at the end of the heap without checking for free space, then a simple
> linear scan should be guaranteed to catch all the data.

Oh?  If people are inserting tuples at the same time you're reading, I'm
not sure this holds good at all.

> There would only have to be a small window with the table locked while the
> indexes are swapped at the end.

Can you say "deadlock"?  Upgrading a lock from shared to exclusive won't
work in general, because there may be other transactions trying to do
the same thing.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: stats_command_string default?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: stats_command_string default?