Re: Hung Vacuum in 8.3 - Mailing list pgsql-bugs

From Mark Kirkwood
Subject Re: Hung Vacuum in 8.3
Date
Msg-id 4D636247.600@catalyst.net.nz
Whole thread Raw
In response to Re: Hung Vacuum in 8.3  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Hung Vacuum in 8.3
List pgsql-bugs
On 22/02/11 19:47, Heikki Linnakangas wrote:
>
> A long query on the same table can block vacuum. Vacuum needs to take
> a so-called "cleanup lock" on each page, which means that it has to
> wait until no other backend holds a pin on the page. A long-running
> query can keep a page pinned for a long time.
>

Ah, - this is LockBufferForCleanup? So we are waiting for an exclusive
LockBuffer operation i.e a LWLock not a (heavyweight) lock, urg... no
wonder.

To mitigate this I'm encouraging the use of a cleanup script for long
running queries - since the app concerned is a web site, there is no
call for queries that run this long (i.e way longer than the timeout for
the respective page rendering).

Thanks for the clarification (assuming I've understood correctly of
course...).

Cheers

Mark

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Hung Vacuum in 8.3
Next
From: Daniel Farina
Date:
Subject: Re: 8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid