Why is RegisterPredicateLockingXid called while holding XidGenLock?

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-05-06 03:22:43 Re: clog_redo causing very long recovery time
Previous Message Robert Haas 2011-05-06 02:30:01 Re: Backpatching of "Teach the regular expression functions to do case-insensitive matching"