Re: clustering without locking

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: clustering without locking
Дата
Msg-id 29002.1209775295@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: clustering without locking  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: clustering without locking
Список pgsql-general
Craig Ringer <craig@postnewspapers.com.au> writes:
> So ... is this crazy? Concurrently clustering the table by moving each
> record *twice*, in batches, with pauses to allow old versions to cease
> being visible by any live transaction? Or can it actually work?

It seems to me you'd have a pretty horrid bloat problem: at completion,
the table and all its indexes must be at least twice the minimum size,
and it's unlikely that you'd be able to compact them much afterward.
(If any other insertions were in progress they'd have probably ended up
near the end of the enlarged table, so just truncating is unlikely to
work for the table --- and for the indexes it's a lost cause entirely.)

Now admittedly this is no worse than what you get after a full-table
UPDATE, but for a maintenance operation that is supposed to be improving
efficiency, it doesn't seem like a pleasant property.

            regards, tom lane

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: clustering without locking
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: clustering without locking