Re: Why is RegisterPredicateLockingXid called while holding XidGenLock?

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

On Thu, May 05, 2011 at 11:12:40PM -0400, Tom Lane wrote:
> Even if it's actually necessary to set up that data structure while
> holding XidGenLock, I would *really* like the call to not be exactly
> where it is.

Good question.

I don't believe it needs to be while XidGenLock is being held at all;
certainly not in this particular place. All that really matters is that
it happens before any backend starts seeing said xid in tuple headers.

I believe the call can be moved over to AssignTransactionId. I'd
probably put it at the end of that function, but it can go anywhere
between there and where it is now. Do you have any preference?

Dan

--
Dan R. K. Ports MIT CSAIL http://drkp.net/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-05-06 04:13:15 Re: Why is RegisterPredicateLockingXid called while holding XidGenLock?
Previous Message Tom Lane 2011-05-06 04:00:53 Re: clog_redo causing very long recovery time