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

Re: Hung Vacuum in 8.3

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Hung Vacuum in 8.3
Date: 2011-02-22 07:14:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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 

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 



In response to


pgsql-bugs by date

Next:From: Daniel FarinaDate: 2011-02-22 08:48:57
Subject: Re: 8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid
Previous:From: Heikki LinnakangasDate: 2011-02-22 06:47:56
Subject: Re: Hung Vacuum in 8.3

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