Commit ea3e15d1 authored by Michael Paquier's avatar Michael Paquier

Fix test failure with -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS

Replication origins created by regression tests should have names
starting with "regress_", and the test introduced in b1e48bbe for commit
timestamps did not do that.

Per buildfarm member longfin.

Discussion: https://postgr.es/m/20200712122507.GD21680@paquier.xyz
parent b1e48bbe
...@@ -88,14 +88,14 @@ SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, ...@@ -88,14 +88,14 @@ SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range,
(1 row) (1 row)
-- Test transaction with replication origin -- Test transaction with replication origin
SELECT pg_replication_origin_create('test_commit_ts: get_origin') != 0 SELECT pg_replication_origin_create('regress_commit_ts: get_origin') != 0
AS valid_roident; AS valid_roident;
valid_roident valid_roident
--------------- ---------------
t t
(1 row) (1 row)
SELECT pg_replication_origin_session_setup('test_commit_ts: get_origin'); SELECT pg_replication_origin_session_setup('regress_commit_ts: get_origin');
pg_replication_origin_session_setup pg_replication_origin_session_setup
------------------------------------- -------------------------------------
...@@ -105,17 +105,17 @@ SELECT txid_current() as txid_with_origin \gset ...@@ -105,17 +105,17 @@ SELECT txid_current() as txid_with_origin \gset
SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, r.roname SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, r.roname
FROM pg_last_committed_xact() x, pg_replication_origin r FROM pg_last_committed_xact() x, pg_replication_origin r
WHERE r.roident = x.roident; WHERE r.roident = x.roident;
ts_in_range | roname ts_in_range | roname
-------------+---------------------------- -------------+-------------------------------
t | test_commit_ts: get_origin t | regress_commit_ts: get_origin
(1 row) (1 row)
SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, r.roname SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, r.roname
FROM pg_xact_commit_timestamp_origin(:'txid_with_origin') x, pg_replication_origin r FROM pg_xact_commit_timestamp_origin(:'txid_with_origin') x, pg_replication_origin r
WHERE r.roident = x.roident; WHERE r.roident = x.roident;
ts_in_range | roname ts_in_range | roname
-------------+---------------------------- -------------+-------------------------------
t | test_commit_ts: get_origin t | regress_commit_ts: get_origin
(1 row) (1 row)
SELECT pg_replication_origin_session_reset(); SELECT pg_replication_origin_session_reset();
...@@ -124,7 +124,7 @@ SELECT pg_replication_origin_session_reset(); ...@@ -124,7 +124,7 @@ SELECT pg_replication_origin_session_reset();
(1 row) (1 row)
SELECT pg_replication_origin_drop('test_commit_ts: get_origin'); SELECT pg_replication_origin_drop('regress_commit_ts: get_origin');
pg_replication_origin_drop pg_replication_origin_drop
---------------------------- ----------------------------
......
...@@ -74,14 +74,14 @@ SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, ...@@ -74,14 +74,14 @@ SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range,
ERROR: could not get commit timestamp data ERROR: could not get commit timestamp data
HINT: Make sure the configuration parameter "track_commit_timestamp" is set. HINT: Make sure the configuration parameter "track_commit_timestamp" is set.
-- Test transaction with replication origin -- Test transaction with replication origin
SELECT pg_replication_origin_create('test_commit_ts: get_origin') != 0 SELECT pg_replication_origin_create('regress_commit_ts: get_origin') != 0
AS valid_roident; AS valid_roident;
valid_roident valid_roident
--------------- ---------------
t t
(1 row) (1 row)
SELECT pg_replication_origin_session_setup('test_commit_ts: get_origin'); SELECT pg_replication_origin_session_setup('regress_commit_ts: get_origin');
pg_replication_origin_session_setup pg_replication_origin_session_setup
------------------------------------- -------------------------------------
...@@ -104,7 +104,7 @@ SELECT pg_replication_origin_session_reset(); ...@@ -104,7 +104,7 @@ SELECT pg_replication_origin_session_reset();
(1 row) (1 row)
SELECT pg_replication_origin_drop('test_commit_ts: get_origin'); SELECT pg_replication_origin_drop('regress_commit_ts: get_origin');
pg_replication_origin_drop pg_replication_origin_drop
---------------------------- ----------------------------
......
...@@ -42,9 +42,9 @@ SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, ...@@ -42,9 +42,9 @@ SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range,
FROM pg_xact_commit_timestamp_origin(:'txid_no_origin') x; FROM pg_xact_commit_timestamp_origin(:'txid_no_origin') x;
-- Test transaction with replication origin -- Test transaction with replication origin
SELECT pg_replication_origin_create('test_commit_ts: get_origin') != 0 SELECT pg_replication_origin_create('regress_commit_ts: get_origin') != 0
AS valid_roident; AS valid_roident;
SELECT pg_replication_origin_session_setup('test_commit_ts: get_origin'); SELECT pg_replication_origin_session_setup('regress_commit_ts: get_origin');
SELECT txid_current() as txid_with_origin \gset SELECT txid_current() as txid_with_origin \gset
SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, r.roname SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, r.roname
FROM pg_last_committed_xact() x, pg_replication_origin r FROM pg_last_committed_xact() x, pg_replication_origin r
...@@ -54,4 +54,4 @@ SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range, ...@@ -54,4 +54,4 @@ SELECT x.timestamp <@ tstzrange('-infinity'::timestamptz, now()) AS ts_in_range,
WHERE r.roident = x.roident; WHERE r.roident = x.roident;
SELECT pg_replication_origin_session_reset(); SELECT pg_replication_origin_session_reset();
SELECT pg_replication_origin_drop('test_commit_ts: get_origin'); SELECT pg_replication_origin_drop('regress_commit_ts: get_origin');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment