pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: pgsql-performance@postgresql.org
Subject: Re: Autovacuum Issue
Date: Fri, 02 Dec 2011 11:35:20 +1300
Message-ID: <4ED80128.80600@catalyst.net.nz> (raw)
In-Reply-To: <CA+TgmobPwvrHXgBYHPcY9jFpaTumGaMHi-vMTm5hFLVxircQGw@mail.gmail.com>
References: <CA+-36iH+UgRP+hhZSOScUtMGTutFtepDNY-E7C_tvubWhbfcjw@mail.gmail.com>
	<CA+TgmobPwvrHXgBYHPcY9jFpaTumGaMHi-vMTm5hFLVxircQGw@mail.gmail.com>

On 02/12/11 07:18, Robert Haas wrote:
>
> And also please share your views on my decision about disable autovacuum for
> my application. I am planning to run vacuum command daily on that small
> table which has frequent updates.
> Sounds like a bad plan.
>

If the table has frequent updates vacuuming once a day will not control 
space bloat from dead rows... so your small table's storage will become 
a very large (even though there are only a few undeleted rows), and 
performance will become terrible.

I would suggest tuning autovacuum to wakeup more frequently (c.f 
autovacuum_naptime parameter), so your small table stays small.

Also you didn't mention what version of Postgres you are running. In 8.4 
and later vacuum (hence autovacuum) is much smarter about finding dead 
rows to clean up, and should have less impact. You can also control the 
load autovacuum puts on your system (c.f autovacuum_vacuum_cost_delay 
parameter).

regards

Mark



view thread (5+ messages)  latest in thread

Message-ID: <4ED80128.80600@catalyst.net.nz>
Permalink:  ../4ED80128.80600@catalyst.net.nz/
Also on:    postgresql.org/message-id/4ED80128.80600@catalyst.net.nz

 · 

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: mark.kirkwood@catalyst.net.nz
  Subject: Re: Autovacuum Issue
  In-Reply-To: <4ED80128.80600@catalyst.net.nz>

* 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