[bugfix] commit timestamps ERROR on lookup of FrozenTransactionId
Craig Ringer <craig@2ndquadrant.com>
From: Craig Ringer <craig@2ndquadrant.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2016-11-23T12:58:22Z
Lists: pgsql-hackers
Attachments
- 0001-Treat-frozen-and-bootstrap-xids-as-old-not-invalid-f.patch (text/x-patch) patch 0001
Hi all
Today I ran into an issue where commit timestamp lookups were failing with
ERROR: cannot retrieve commit timestamp for transaction 2
which is of course FrozenTransactionId.
TransactionIdGetCommitTsData(...) ERRORs on !TransactionIdIsNormal(),
which I think is wrong. Attached is a patch to make it return 0 for
FrozenTransactionId and BootstrapTransactionId, like it does for xids
that are too old.
Note that the prior behaviour was as designed and has tests to enforce
it. I just think it's wrong, and it's also not documented.
IMO this should be back-patched to 9.6 and, without the TAP test part, to 9.5.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Fix commit_ts for FrozenXid and BootstrapXid
- 9b66342901f2 9.6.2 landed
- 7816d13563b7 9.5.6 landed
- 4aaddf2f0098 10.0 landed