Re: Vacuuming Questions

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "John Gardner" <john(dot)gardner(at)tagish(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Vacuuming Questions
Date: 2008-04-23 16:06:42
Message-ID: dcc563d10804230906n41fcf0ffqac70d0f119fde7a8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 23, 2008 at 9:27 AM, John Gardner <john(dot)gardner(at)tagish(dot)co(dot)uk> wrote:
> We have two PostgreSQL servers (8.2) running in a cluster.
>
> We have autovacuum switched on on both servers and also we are running the
> following as a cron job;
>
> Server 1:
> 30 0,2,4,6,8,10,12,14,16,18,20,22 * * * /usr/bin/vacuumdb --all --analyze

You can change that to

30 0-59/2 * * * ...
and
30 1-59/2 * * *

(I think the second one does the odd minutes. might need to test it.

> 1) Is using the autovacuum daemon and running vacuumdb from a cron job
> overkill?

Maybe. It's probably better let autovacuum handle most of the db, and
use a single vacuum analyze on the one really busy table.

It's possible that you're using up too much of your I/O bandwidth
cleaning a bunch of table that don't need it. As Joshua mentioned,
it's probably a good idea to look at 8.3 due to its ability to run >1
autovacuum thread at a time.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Tassonis 2008-04-23 16:22:10 Re: initdb in 8.3
Previous Message Stephan Szabo 2008-04-23 16:05:02 Re: Updating with a subselect