On 02/27/2012 08:53 AM, Andrew Dunstan wrote:

If he has autovacuum on he could well be just fine with his proposed
strategy. Or he could have tables partitioned by time and do the delete
by just dropping partitions. There are numerous way he could get this to
work.

He isn't using partitions though. That's the whole reason for this thread. Having autovacuum turned on (which should be the case for 8.4 and above anyway) will not magically remove the old rows. VACUUM marks rows as dead/reusable, so INSERT and UPDATE statements will take the dead spots instead of creating new extents.

Like I said, this will stop his tables from growing further so long as he keeps his maintenance functions running regularly from now on, but the existing rows he's trying to delete will never go away until he runs a CLUSTER or some other system of actually purging the dead rows.

Notice how I don't suggest using VACUUM FULL. :)

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-444-8534
stho...@peak6.com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to 
this email

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

Reply via email to