Search Postgresql Archives

Re: VACUUM process running for a long time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jan Krcmar wrote:
You might consider partitioning this table by date, either by day or by
week, and instead of deleting old rows, drop entire old partitions
this is not really good workaround...

It is in fact the only good workaround for your problem, which you'll eventually come to realize if you struggle with this class of problem for long enough. You can continue to fight with autovacuum forever, but it's a battle you'll never quite win if you're deleting 2GB per day. Even if you get vacuum running often enough to clean up the space, you'll still have a constant struggle to keep your indexes working efficiently.

Or you can partition by day or week and make the entire problem go away. Dropping an old partition requires no vacuum cleanup and leaves behind no index issues. It really is the right solution here if you want to solve this problem once, rather than continuing to fight it a little every single day forever.

--
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@xxxxxxxxxxxxxxx   www.2ndQuadrant.us


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux