Re: Why is RegisterPredicateLockingXid called while holding XidGenLock?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <drkp(at)csail(dot)mit(dot)edu>,<tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Why is RegisterPredicateLockingXid called while holding XidGenLock?
Date: 2011-05-06 04:31:05
Message-ID: 4DC33339020000250003D364@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> Yeah, I was thinking that it'd be better to pull it out of
> GetNewTransactionId and put it in a higher level.

As long as it is always called when an xid is assigned. Since this
function appears to be on the only path to that, it should be fine.

> No strong preference about where in AssignTransactionId to put it.
> Is there any chance that it would be significant whether we do it
> before or after taking the lock on the XID (XactLockTableInsert)?

No, but since we need to do it only on a top level assignment, we
could save a couple cycles by putting it on an else on line 456.

-Kevin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nick Raj 2011-05-06 05:14:19 Debug contrib/cube code
Previous Message Tom Lane 2011-05-06 04:18:03 Re: Why is RegisterPredicateLockingXid called while holding XidGenLock?