Re: Alternative for vacuuming queue-like tables

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Alternative for vacuuming queue-like tables
Дата
Msg-id 1146563110.14093.120.camel@coppola.muc.ecircle.de
обсуждение исходный текст
Ответ на Re: Alternative for vacuuming queue-like tables  (Robert Treat <xzilla@users.sourceforge.net>)
Список pgsql-general
> > I guess what I'm asking for is a kind of "REBUILD TABLE" which is not
> > MVCC by definition but it would be useful in the mentioned queue table
> > case.
> >
>
> vaccum full ?

Nope, it won't work, it will still leave in all the dead tuples
potentially visible by old transactions, even if those transactions
didn't touch yet the vacuumed table. In my case that means for some
tables sometimes 1000s times of bloat, given that the table always has
few active rows and high insert/update/delete rates...

CLUSTER is locking the table exclusively, which means it will wait until
all transactions which actually touched the table are finished, and then
rebuild the table, ignoring dead rows, without caring about old
transactions who could still see the dead rows (at least this is how I
think it works based on my observations). Perfect for my purpose, but
not MVCC...

Cheers,
Csaba.



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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: How would I write this query...
Следующее
От: "Florian G. Pflug"
Дата:
Сообщение: Using a pointer as statetype for an aggregate