Re: Concurrency question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Mark Steben <msteben(at)autorevenue(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Concurrency question
Date: 2009-07-07 22:11:53
Message-ID: 29706.1247004713@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> writes:
> On Tue, Jul 7, 2009 at 3:40 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)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
holding AccessSharelock, and some third session is trying to acquire
an exclusive lock (eg for ALTER TABLE), and then vacuum comes along and
wants ShareUpdateExclusiveLock. That would cause vacuum to queue up
behind the waiting exclusive lock request. However, Mark asserts that
the vacuum did successfully acquire ShareUpdateExclusiveLock, which if
accurate would eliminate this scenario. But there might have been
something similar going on at a page or tuple level. We can't tell with
no knowledge of what else was in the system, but I'm betting there was
at least one other lock request involved.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jennifer Spencer 2009-07-07 22:58:19 Re: Catching up Production from Warm Standby after maintenance - Please help
Previous Message Scott Marlowe 2009-07-07 22:04:49 Re: Concurrency question