online reindex

Поиск
Список
Период
Сортировка
От Greg Stark
Тема online reindex
Дата
Msg-id 87lm0ggtif.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответы Re: online reindex  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
It sounds to me like it should be fairly straightforward to implement online
reindex. That is, reindex without locking the table. This is an important
feature for 24x7 operation. Since postgres doesn't modify data in place the
only thing required for online reindex is to ensure that the reindex operation
sees all of the latest data.

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.

(I'm not sure how the indexing operation works, if it reads in the whole table
and then sorts it there would have to be an extra step where any new tuples
are read in and inserted.)

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

-- 
greg



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: location of the configuration files
Следующее
От: Patrick Welche
Дата:
Сообщение: Re: psql and readline