Re: Autovacuum / full vacuum

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Autovacuum / full vacuum
Date: 2006-01-17 17:30:47
Message-ID: 20060117173046.GA4296@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Chris Browne wrote:
> ajs(at)crankycanuck(dot)ca (Andrew Sullivan) writes:
> > On Tue, Jan 17, 2006 at 11:18:59AM +0100, Michael Riess wrote:
> >> hi,
> >>
> >> I'm curious as to why autovacuum is not designed to do full vacuum. I
> >
> > Because nothing that runs automatically should ever take an exclusive
> > lock on the entire database, which is what VACUUM FULL does.
>
> That's a bit more than what autovacuum would probably do...
> autovacuum does things table by table, so that what would be locked
> should just be one table.

Even a database-wide vacuum does not take locks on more than one table.
The table locks are acquired and released one by one, as the operation
proceeds. And as you know, autovacuum (both 8.1's and contrib) does
issue database-wide vacuums, if it finds a database close to an xid
wraparound.

--
Alvaro Herrera http://www.advogato.org/person/alvherre
"Las mujeres son como hondas: mientras más resistencia tienen,
más lejos puedes llegar con ellas" (Jonas Nightingale, Leap of Faith)

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2006-01-17 17:31:43 Re: Autovacuum / full vacuum
Previous Message Markus Schaber 2006-01-17 17:25:06 Re: Autovacuum / full vacuum