]> granicus.if.org Git - postgresql/blob - src/test/modules/commit_ts/expected/commit_timestamp_1.out
a4253faa7b7159e471b57f2cf8bab0c981591340
[postgresql] / src / test / modules / commit_ts / expected / commit_timestamp_1.out
1 --
2 -- Commit Timestamp
3 --
4 SHOW track_commit_timestamp;
5  track_commit_timestamp 
6 ------------------------
7  off
8 (1 row)
9
10 CREATE TABLE committs_test(id serial, ts timestamptz default now());
11 INSERT INTO committs_test DEFAULT VALUES;
12 INSERT INTO committs_test DEFAULT VALUES;
13 INSERT INTO committs_test DEFAULT VALUES;
14 SELECT id,
15        pg_xact_commit_timestamp(xmin) >= ts,
16        pg_xact_commit_timestamp(xmin) <= now(),
17        pg_xact_commit_timestamp(xmin) - ts < '60s' -- 60s should give a lot of reserve
18 FROM committs_test
19 ORDER BY id;
20 ERROR:  could not get commit timestamp data
21 HINT:  Make sure the configuration parameter "track_commit_timestamp" is set.
22 DROP TABLE committs_test;
23 SELECT pg_xact_commit_timestamp('0'::xid);
24 ERROR:  could not get commit timestamp data
25 HINT:  Make sure the configuration parameter "track_commit_timestamp" is set.
26 SELECT pg_xact_commit_timestamp('1'::xid);
27 ERROR:  could not get commit timestamp data
28 HINT:  Make sure the configuration parameter "track_commit_timestamp" is set.
29 SELECT pg_xact_commit_timestamp('2'::xid);
30 ERROR:  could not get commit timestamp data
31 HINT:  Make sure the configuration parameter "track_commit_timestamp" is set.
32 SELECT x.xid::text::bigint > 0, x.timestamp > '-infinity'::timestamptz, x.timestamp <= now() FROM pg_last_committed_xact() x;
33 ERROR:  could not get commit timestamp data
34 HINT:  Make sure the configuration parameter "track_commit_timestamp" is set.