Re: AutoVacuum on demand?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
Cc: Glen Parker <glenebob(at)nwlink(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: AutoVacuum on demand?
Date: 2006-11-10 14:24:29
Message-ID: 20061110142429.GC6612@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Broersma Jr wrote:
> > Richard Broersma Jr wrote:
> > >> Cron yes, vacuumdb no. I would like to AUTO vacuum periodically.
> > > Just curious, what is auto_vacuum going to give that vacuumdb wont?
> > Hmm, I thought this would be obvious. Vacuumdb just issues "VACUUM"
> > commands.
> > I would like the get the functionality if autovacuum so that I don't
> > waste cycles on tables that don't really need vacuuming. However, we've
> > had bad luck letting autovacuum run on its own terms, so we've reverted
> > to the old nightly vacuums.
> > Since our nightly window of relative inactivity continues to shrink, I'd
> > like to vacuum/analyze only the tables that autovacuum thinks need it,
> > all at once, and only when I tell it to (via cron).
> > Make more sense?
>
> Yes that make sense. I don't know if this helps, but I remember
> reading a thread on one of the lists that discussed adding
> functionality to auto_vacuum to allow it to ignore specified tables.
> I can't remember if this is a newly added feature or if it is slated
> for 8.2.

It's present in 8.1. Just set "enabled" to false on pg_autovacuum for
the given table. (If there's no tuple, insert one).

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Staubo 2006-11-10 14:24:58 Using GIN indexes on 8.2
Previous Message Martijn van Oosterhout 2006-11-10 14:19:04 Re: ECPG and multiple threads