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

Re: lazy vxid locks, v3

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: lazy vxid locks, v3
Date: 2011-08-01 16:12:41
Message-ID: CA+TgmoarkrqQjFdKZC=-z1p4p+Oaoethef0euLZ4yDpCdNpezQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Aug 1, 2011 at 11:21 AM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Mon, 2011-08-01 at 08:12 -0400, Robert Haas wrote:
>> > Is the "&& LocalTransactionIdIsValid(lxid)" a guard against calling
>> > VirtualXactLockTableCleanup twice? Can that happen? Or is it just
>> > defensive coding to avoid making an additional assumption?
>>
>> lxid there is just a local variable storing the value that we
>> extracted from fpLocalTransactionId while holding the lock.  I named
>> it that way just as a mnemonic for the type of value that it was, not
>> intending to imply that it was copied from MyProc->lxid.
>
> I know, this is the other purpose of fpLocalTransactionId that I was
> talking about. Is it just a guard against calling
> VirtualXactLockTableCleanup twice?

I guess you could look at that way.  It just seemed like the obvious
way to write the code: we do LockRefindAndRelease() only if we have a
fast-path lock that someone else has pushed into the main table.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2011-08-01 16:42:01
Subject: PgWest CFP extended for 12 days
Previous:From: Dean RasheedDate: 2011-08-01 16:04:48
Subject: Compressing the AFTER TRIGGER queue

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