mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-12 09:27:04 +08:00
Fix commit_ts test suite for systems with coarse timestamp granularity.
Noticed on a couple of Windows configurations. Petr Jelinek, reviewed by Michael Paquier.
This commit is contained in:
@ -10,7 +10,7 @@ INSERT INTO committs_test DEFAULT VALUES;
|
||||
|
||||
SELECT id,
|
||||
pg_xact_commit_timestamp(xmin) >= ts,
|
||||
pg_xact_commit_timestamp(xmin) < now(),
|
||||
pg_xact_commit_timestamp(xmin) <= now(),
|
||||
pg_xact_commit_timestamp(xmin) - ts < '60s' -- 60s should give a lot of reserve
|
||||
FROM committs_test
|
||||
ORDER BY id;
|
||||
@ -21,4 +21,4 @@ SELECT pg_xact_commit_timestamp('0'::xid);
|
||||
SELECT pg_xact_commit_timestamp('1'::xid);
|
||||
SELECT pg_xact_commit_timestamp('2'::xid);
|
||||
|
||||
SELECT x.xid::text::bigint > 0, x.timestamp > '-infinity'::timestamptz, x.timestamp < now() FROM pg_last_committed_xact() x;
|
||||
SELECT x.xid::text::bigint > 0, x.timestamp > '-infinity'::timestamptz, x.timestamp <= now() FROM pg_last_committed_xact() x;
|
||||
|
||||
Reference in New Issue
Block a user