Alternative for vacuuming queue-like tables
От
Csaba Nagy
Тема
Alternative for vacuuming queue-like tables
Дата
Msg-id
1146228005.14093.77.camel@coppola.muc.ecircle.de
Список
Дерево обсуждения
Re: Alternative for vacuuming queue-like tables Chris Browne <cbbrowne@acm.org>
Re: Alternative for vacuuming queue-like tables Csaba Nagy <nagy@ecircle-ag.com>
Re: Alternative for vacuuming queue-like tables Robert Treat <xzilla@users.sourceforge.net>
Re: Alternative for vacuuming queue-like tables Csaba Nagy <nagy@ecircle-ag.com>
Re: Alternative for vacuuming queue-like tables "Florian G. Pflug" <fgp@phlo.org>
Re: Alternative for vacuuming queue-like tables Tom Lane <tgl@sss.pgh.pa.us>
Re: Alternative for vacuuming queue-like tables "Jim C. Nasby" <jnasby@pervasive.com>
Re: Alternative for vacuuming queue-like tables Tom Lane <tgl@sss.pgh.pa.us>
Re: Alternative for vacuuming queue-like tables "Jim C. Nasby" <jnasby@pervasive.com>
Re: Alternative for vacuuming queue-like tables "Florian G. Pflug" <fgp@phlo.org>
Hi all, Short background: postgres does not support very well queue type tables in an environment where these queue tables are small in size but heavily inserted/updated/deleted, while there are activities in the system which cause long running transactions. The reason is that the queue table cannot be vacuumed properly due to the long running transactions, and suffers bloat. This was a quite big problem for our postgres systems, until I discovered that there is an alternative solution to vacuuming if the transactions on the queue table are always short. Beside vacuuming aggressively the queue table (which works fine most of the time, when I have no long running transaction currently) I placed a cron job to cluster the queue table on it's PK index. That seems to work well, the table is kept small even in the presence of long running transactions. The only time this is NOT working if some long running transaction actually accesses the queue table. An example is a full DB backup. I know this made one of my systems drop it's load significantly. HTH, Csaba.
В списке pgsql-general по дате отправления
От: Mike Leahy
Дата: