Re: Autovac vs manual with analyze

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Scott Whitney <swhitney(at)journyx(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Autovac vs manual with analyze
Date: 2010-03-15 22:35:43
Message-ID: 20100315223543.GH3323@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Scott Whitney wrote:

> So, my questions are:
>
> a) Is the manual vacuum needed for performance reasons, or is auto-vac sufficient?
> b) How do my settings look?
> c) Is there a way that the clogs get cleared via autovac, would a full vac of just template1/template0 (if that last is possible) do it?
>

Autovacuum should be sufficient, provided that the FSM settings are
large enough to hold 20% (plus a bit of slack) of your database total
size in dead tuples. If they are not, your database starts to bloat and
you need ugly hacks like vacuum full to recover the dead space.

In 8.1, clog is only cleared by database-wide vacuums, which IIRC
autovac doesn't do unless it does a for-Xid-wraparound run, which is not
often. Probably a weekly database-wide vacuum (not full, i.e. vacuumdb
without -f) is enough.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2010-03-16 01:01:33 Re: Mixing DBLink versions
Previous Message David Jantzen 2010-03-15 21:29:51 Mixing DBLink versions