pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Riess <mlriess@gmx.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: Autovacuum / full vacuum
Date: Tue, 17 Jan 2006 10:19:58 -0300
Message-ID: <20060117131958.GC2785@surnet.cl> (raw)
In-Reply-To: <dqigaf$1b98$1@news.hub.org>
References: <dqigaf$1b98$1@news.hub.org>

Michael Riess wrote:
> hi,
> 
> I'm curious as to why autovacuum is not designed to do full vacuum.

Because a VACUUM FULL is too invasive.  Lazy vacuum is so light on the
system w.r.t. locks that it's generally not a problem to start one at
any time.  On the contrary, vacuum full could be a disaster on some
situations.

What's more, in general a lazy vacuum is enough to keep the dead space
within manageability, given a good autovacuum configuration and good FSM
configuration, so there's mostly no need for full vacuum.  (This is the
theory at least.)  For the situations where there is a need, we tell you
to issue it manually.

> So my question is: What's the use of an autovacuum daemon if I still 
> have to use a cron job to do full vacuums? wouldn't it just be a minor 
> job to enhance autovacuum to be able to perform full vacuums, if one 
> really wants it to do that - even if some developers think that it's the 
> wrong approach?

Yes, it is a minor job to "enhance" it to perform vacuum full.  The
problem is having a good approach to determining _when_ to issue a full
vacuum, and having a way to completely disallow it.  If you want to do
the development work, be my guest (but let us know your design first).
If you don't, I guess you would have to wait until it comes high enough
on someone's to-do list, maybe because you convinced him (or her, but we
don't have Postgres-ladies at the moment AFAIK) monetarily or something.

You can, of course, produce a patch and use it internally.  This is free
software, remember.

-- 
Alvaro Herrera                           Developer, http://www.PostgreSQL.org
"God is real, unless declared as int"



view thread (39+ messages)  latest in thread

Message-ID: <20060117131958.GC2785@surnet.cl>
Permalink:  ../20060117131958.GC2785@surnet.cl/
Also on:    postgresql.org/message-id/20060117131958.GC2785@surnet.cl

 · 

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: alvherre@alvh.no-ip.org, mlriess@gmx.de
  Subject: Re: Autovacuum / full vacuum
  In-Reply-To: <20060117131958.GC2785@surnet.cl>

* 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