Re: Concurrency question - Mailing list pgsql-admin

From Greg Stark
Subject Re: Concurrency question
Date
Msg-id 407d949e0907071713s1ac217b9o90c3bb5e8d2b2b72@mail.gmail.com
Whole thread Raw
In response to Re: Concurrency question  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Concurrency question  ("Mark Steben" <msteben@autorevenue.com>)
List pgsql-admin
On Tue, Jul 7, 2009 at 11:11 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
> Scott Marlowe <scott.marlowe@gmail.com> writes:
>> On Tue, Jul 7, 2009 at 3:40 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
>>> The described situation is impossible: AccessSharelock doesn't block
>>> ShareUpdateExclusiveLock.  There must have been some other lock or
>>> attempted lock involved (perhaps at a page or tuple level rather than
>>> the whole-relation level).  But we can't tell much from this much detail.
>
>> So something like alter table or something?
>
> Well, one possible way to block vacuum is that the idle transaction is

Another way to block vacuum is to be in the middle of scanning the
table and have a pin on a page that vacuum wants to clean. For
example, say that transaction has a cursor open for a sequential scan
of that table and has stopped reading from the cursor, just sitting
"idle" but with the cursor still stuck on that page. In that case
vacuum would wait on that page waiting for the query to make progress
and move onto a new page so it can clean it.

--
greg
http://mit.edu/~gsstark/resume.pdf

pgsql-admin by date:

Previous
From: Jennifer Spencer
Date:
Subject: Re: Catching up Production from Warm Standby after maintenance - Please help
Next
From: Scott Marlowe
Date:
Subject: Re: Catching up Production from Warm Standby after maintenance - Please help