Re: auto truncate/vacuum full - Mailing list pgsql-general

From Tom Lane
Subject Re: auto truncate/vacuum full
Date
Msg-id 27859.1256747584@sss.pgh.pa.us
Whole thread Raw
In response to Re: auto truncate/vacuum full  (Jaime Casanova <jcasanov@systemguards.com.ec>)
List pgsql-general
Jaime Casanova <jcasanov@systemguards.com.ec> writes:
> On Tue, Oct 27, 2009 at 6:29 PM, Alvaro Herrera
> <alvherre@commandprompt.com> wrote:
>> Do you have a vacuum in cron or something like that?  As Tom says, if it
>> had been autovacuum, it should have been cancelled automatically (else
>> we've got a bug); but something invoking vacuum externally wouldn't
>> have, so what you describe is what we would expect.

> then we have a bug (at least in 8.3, haven't tried in 8.4)... i see
> this a month ago, an autovacuum blocking a lot of concurrent updates
> and selects... once i pg_cancel_backend() the autovacuum process the
> other ones starting to move

Hmm ... actually there is one case where autovac won't allow itself
to be kicked off locks, which is if it's performing an anti-wraparound
vacuum.  Perhaps anti-wraparound vacuums should skip trying to truncate
relations?

I'm not convinced that that explains Jaime's report though.  You'd
expect AW vacuums to only happen on mostly-unused tables, not ones
that are sufficiently central to an application to result in blocking
a lot of queries ...

            regards, tom lane

pgsql-general by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: auto truncate/vacuum full
Next
From: Stuart Adams
Date:
Subject: Forms generator ?