]> granicus.if.org Git - postgresql/commit
Fix commit_ts for FrozenXid and BootstrapXid
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 24 Nov 2016 18:39:55 +0000 (15:39 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 24 Nov 2016 18:39:55 +0000 (15:39 -0300)
commit7816d13563b74379c9db618e46883c6db5fc0680
tree0bbdb718da67abb6f55669689f56dc0ec8ad4874
parente0375d77b691f6cab70934c63d3212a4713f66df
Fix commit_ts for FrozenXid and BootstrapXid

Previously, requesting commit timestamp for transactions
FrozenTransactionId and BootstrapTransactionId resulted in an error.
But since those values can validly appear in committed tuples' Xmin,
this behavior is unhelpful and error prone: each caller would have to
special-case those values before requesting timestamp data for an Xid.
We already have a perfectly good interface for returning "the Xid you
requested is too old for us to have commit TS data for it", so let's use
that instead.

Backpatch to 9.5, where commit timestamps appeared.

Author: Craig Ringer
Discussion: https://www.postgresql.org/message-id/CAMsr+YFM5Q=+ry3mKvWEqRTxrB0iU3qUSRnS28nz6FJYtBwhJg@mail.gmail.com
src/backend/access/transam/commit_ts.c
src/test/modules/commit_ts/expected/commit_timestamp.out
src/test/modules/commit_ts/expected/commit_timestamp_1.out