Skip site navigation (1) Skip section navigation (2)

Re: Autovaccum and Full vacuum

From: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
To: Shoaib Mir <shoaibmir(at)gmail(dot)com>
Cc: Tony Day <tonyd(at)panztel(dot)com>, pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Autovaccum and Full vacuum
Date: 2010-05-05 05:37:42
Message-ID: i2x3073cc9b1005042237qd58851b5sd46404b1fa6a5e20@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, May 5, 2010 at 12:01 AM, Shoaib Mir <shoaibmir(at)gmail(dot)com> wrote:
> On Wed, May 5, 2010 at 2:46 PM, Tony Day <tonyd(at)panztel(dot)com> wrote:
>>
>> Hi Shoaib
>>
>> Thanks for the response.
>>
>> Sorry - I forgot to mention that I am using PostgreSQL 8.3.9 on Ubuntu
>> 9.04.
>> And just to be clear - I am not suggesting that there is a bug in
>> Postgresql :-)
>> I am just trying to clarify what it does and doesn't do.
>>
>>
>
> You can find on docs autovacuum
> at http://www.postgresql.org/docs/8.3/static/routine-vacuuming.html#AUTOVACUUM
> It uses VACUUM and not VACUUM FULL, there shouldn't be a need of VACUUM FULL
> if you have autovacuum enabled with proper thresholds. There can be an odd
> case where you might have to make auto-vacuum a little more aggressive for a
> specific table.

autovacuum never executes VACUUM FULL, but...

in 8.3, sometimes it finds a page that is empty so it truncate it to
release space, and that needs an stronger lock than the normal it uses
(but i don't remember exactly what type of lock) and when the
autovacuum is executing for anti wraparound problems it cannot be
cancelled...

so, if an autovacuum execute vacuum for anti wraparound problems and
it finds empty pages that should be truncated then you get a situation
where a table is locked and you can't terminate the vacuum, if the
table is big there are problems... no idea if this happens in 8.4


-- 
Jaime Casanova         www.2ndQuadrant.com
Soporte y capacitación de PostgreSQL

In response to

pgsql-novice by date

Next:From: Shoaib MirDate: 2010-05-05 05:38:29
Subject: Re: Autovacuum working / not working ?
Previous:From: Machiel RichardsDate: 2010-05-05 05:28:04
Subject: Autovacuum working / not working ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group