Why is RegisterPredicateLockingXid called while holding XidGenLock? - Mailing list pgsql-hackers

From Tom Lane
Subject Why is RegisterPredicateLockingXid called while holding XidGenLock?
Date
Msg-id 1617.1304651560@sss.pgh.pa.us
Whole thread Raw
Responses Re: Why is RegisterPredicateLockingXid called while holding XidGenLock?  (Dan Ports <drkp@csail.mit.edu>)
List pgsql-hackers
Inquiring minds want to know ...

This seems like a pretty lousy place to do it, first because of the
contention hit from holding that high-traffic lock any longer than
necessary, and second because every added chance for error between
ExtendCLOG() and TransactionIdAdvance(ShmemVariableCache->nextXid)
gives us another way to fail in the way recently mentioned by Joe
Conway:
http://archives.postgresql.org/message-id/4DBE4E7D.80501@joeconway.com

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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Backpatching of "Teach the regular expression functions to do case-insensitive matching"
Next
From: Tom Lane
Date:
Subject: Re: clog_redo causing very long recovery time