pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Anibal David Acosta <aa@devshock.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: autovacuum, exclude table
Date: Mon, 12 Dec 2011 17:16:08 +0200
Message-ID: <4EE61AB8.1010202@enterprisedb.com> (raw)
In-Reply-To: <00f501ccb8d9$f07dc4d0$d1794e70$@devshock.com>
References: <00f501ccb8d9$f07dc4d0$d1794e70$@devshock.com>

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



view thread (5+ messages)  latest in thread

Message-ID: <4EE61AB8.1010202@enterprisedb.com>
Permalink:  ../4EE61AB8.1010202@enterprisedb.com/
Also on:    postgresql.org/message-id/4EE61AB8.1010202@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: heikki.linnakangas@enterprisedb.com, aa@devshock.com
  Subject: Re: autovacuum, exclude table
  In-Reply-To: <4EE61AB8.1010202@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox