Don't try to fetch database name when SetTransactionIdLimit() is executed
Tom Lane <tgl@sss.pgh.pa.us>
Don't try to fetch database name when SetTransactionIdLimit() is executed outside a transaction. This repairs brain fade in my patch of 2009-08-30: the reason we had been storing oldest-database name, not OID, in ShmemVariableCache was of course to avoid having to do a catalog lookup at times when it might be unsafe. This error explains why Aleksandr Dushein is having trouble getting out of an XID wraparound state in bug #5718, though not how he got into that state in the first place. I suspect pg_upgrade is at fault there.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/varsup.c | modified | +14 −4 |