Re: autovacuum, exclude table - Mailing list pgsql-performance

From Heikki Linnakangas
Subject Re: autovacuum, exclude table
Date
Msg-id 4EE61AB8.1010202@enterprisedb.com
Whole thread Raw
In response to autovacuum, exclude table  ("Anibal David Acosta" <aa@devshock.com>)
List pgsql-performance
On 12.12.2011 16:25, Anibal David Acosta wrote:
> I have a couple of tables with about 400millions of records increasing about
> 5 millions per day.
>
> I think that disabling autovac over those tables, and enabling daily manual
> vacuum (in some idle hour) will be better.
>
> I am right?

Possibly. If the system is otherwise idle, it sounds sensible to do
routine maintenance at that time.

> Is possible to exclude autovacuum over some tables?

Sure, see
http://www.postgresql.org/docs/9.1/static/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS

ALTER TABLE foo SET (autovacuum_enabled=false, toast.autovacuum_enabled
= false);

It might be better, though, to let autovacuum enabled, and just do the
additional manual VACUUM in the idle period. If the daily manual VACUUM
is enough to keep the bloat within the autovacuum thresholds, autovacuum
will never kick in. If it's not enough, then you probably want
autovacuum to run.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-performance by date:

Previous
From: "Anibal David Acosta"
Date:
Subject: Re: autovacuum, exclude table
Next
From: Tom Lane
Date:
Subject: Re: autovacuum, exclude table