Vaccuum best practice: cronjob or autovaccuum?

From: "Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com>
To: "PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Vaccuum best practice: cronjob or autovaccuum?
Date: 2008-08-28 11:53:17
Message-ID: e373d31e0808280453y1d2ce972s254eb9b5bc5d476d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

The reason we introduced the cronjob we felt was that the autovaccuum
was not really doing its job. I wonder if anyone can share some
insight on whether these settings are good for a DB that is basically
24x7:

autovacuum = on
autovacuum_vacuum_cost_delay = 20
vacuum_cost_delay = 20
autovacuum_naptime = 10
stats_start_collector = on
stats_row_level = on
autovacuum_vacuum_threshold = 75
autovacuum_analyze_threshold = 25
autovacuum_analyze_scale_factor = 0.02
autovacuum_vacuum_scale_factor = 0.01

Thanks! I've read up some websites for this kind of tuning, but often
the info is for older versions of DBs and some of the tweaks have
changed since. I am on 8.2.9.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2008-08-28 13:16:05 Re: Slow PG after upgrade to 8.2.9!!
Previous Message Devrim GÜNDÜZ 2008-08-28 11:44:08 Re: Slow PG after upgrade to 8.2.9!!