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: | 4D636247.600@catalyst.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
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
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Farina | 2011-02-22 08:48:57 | Re: 8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid |
Previous Message | Heikki Linnakangas | 2011-02-22 06:47:56 | Re: Hung Vacuum in 8.3 |