From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Hung Vacuum in 8.3
Date: Tue, 22 Feb 2011 20:14:15 +1300
Message-ID: <4D636247.600@catalyst.net.nz> (raw)
In-Reply-To: <4D635C1C.7040304@enterprisedb.com>
References: <4D6330E9.6030809@catalyst.net.nz>
<4D635C1C.7040304@enterprisedb.com>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: mark.kirkwood@catalyst.net.nz, heikki.linnakangas@enterprisedb.com
Subject: Re: Hung Vacuum in 8.3
In-Reply-To: <4D636247.600@catalyst.net.nz>
References: <4D6330E9.6030809@catalyst.net.nz> <4D635C1C.7040304@enterprisedb.com> <4D636247.600@catalyst.net.nz>
* 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