diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-11-24 15:39:55 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-11-24 15:39:55 -0300 |
commit | 4aaddf2f009821e29aea3735e44332ad9ca47aaa (patch) | |
tree | 95273ec49be23d4e2cdffeeeb24f2d4df6464884 /src/test/modules/commit_ts/expected/commit_timestamp_1.out | |
parent | 6fa391be4e83139cd134d5ccfc1499809bb8c98c (diff) | |
download | postgresql-4aaddf2f009821e29aea3735e44332ad9ca47aaa.tar.gz postgresql-4aaddf2f009821e29aea3735e44332ad9ca47aaa.zip |
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
Diffstat (limited to 'src/test/modules/commit_ts/expected/commit_timestamp_1.out')
-rw-r--r-- | src/test/modules/commit_ts/expected/commit_timestamp_1.out | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/modules/commit_ts/expected/commit_timestamp_1.out b/src/test/modules/commit_ts/expected/commit_timestamp_1.out index 2f1f41d2099..c10b0abc2b7 100644 --- a/src/test/modules/commit_ts/expected/commit_timestamp_1.out +++ b/src/test/modules/commit_ts/expected/commit_timestamp_1.out @@ -23,9 +23,17 @@ DROP TABLE committs_test; SELECT pg_xact_commit_timestamp('0'::xid); ERROR: cannot retrieve commit timestamp for transaction 0 SELECT pg_xact_commit_timestamp('1'::xid); -ERROR: cannot retrieve commit timestamp for transaction 1 + pg_xact_commit_timestamp +-------------------------- + +(1 row) + SELECT pg_xact_commit_timestamp('2'::xid); -ERROR: cannot retrieve commit timestamp for transaction 2 + pg_xact_commit_timestamp +-------------------------- + +(1 row) + SELECT x.xid::text::bigint > 0, x.timestamp > '-infinity'::timestamptz, x.timestamp <= now() FROM pg_last_committed_xact() x; ERROR: could not get commit timestamp data HINT: Make sure the configuration parameter "track_commit_timestamp" is set. |