Skip site navigation (1) Skip section navigation (2)

Re: Vaccuum best practice: cronjob or autovaccuum?

From: Andrew Sullivan <ajs(at)commandprompt(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Vaccuum best practice: cronjob or autovaccuum?
Date: 2008-08-28 13:21:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Thu, Aug 28, 2008 at 07:53:17PM +0800, Phoenix Kiula wrote:
> On our database of about 5GB we vaccuum all of our 12 tables (only one
> is huge, all others have about 100,000 rows or so) every hour or so.
> But we also have autovaccuum enabled. Is this okay? Do the two vaccuum
> processes contradict each other, or add unnecessary load to the
> system?

They do the latter.  Especially vacuuming every hour, you're foiling
the autovacuum and just introducing completely unnecessary load.
> The reason we introduced the cronjob we felt was that the autovaccuum
> was not really doing its job. 

What gave you this feeling?

What's the "churn rate" on these tables (i.e. how fast do dead rows
get created?)

My suspicion is that, using the 8.2 autovacuum, your "huge" table
needs to be vacuumed manually, and the others just left to
autovacuum.   But that's just a guess at the moment.

Andrew Sullivan
+1 503 667 4564 x104

In response to

pgsql-general by date

Next:From: Julio LeyvaDate: 2008-08-28 14:02:03
Subject: Re: [GENERAL] PITR - base backup question
Previous:From: Andrew SullivanDate: 2008-08-28 13:16:05
Subject: Re: Slow PG after upgrade to 8.2.9!!

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group