Adjust expected answer file for segwalrep/pg_basebackup.out.
@@ -13,7 +13,7 @@ ERROR: replication slot "some_replication_slot" does not exist
-- When pg_basebackup runs with --slot and stream as xlog-method
select pg_basebackup(address, port, 'some_replication_slot', '/tmp/some_isolation2_pg_basebackup') from gp_segment_configuration where content = 0 and role = 'p';
pg_basebackup
--------------
+---------------
(1 row)
@@ -23,14 +23,14 @@ pg_basebackup
-- base backup
0U: select slot_name, slot_type, active, restart_lsn is not NULL as slot_was_used from pg_get_replication_slots() where slot_name = 'some_replication_slot';
slot_name | slot_type | active | slot_was_used
----------------------+---------+------+-------------
+-----------------------+-----------+--------+---------------
some_replication_slot | physical | f | t
(1 row)
-- Given we remove the replication slot
0U: select * from pg_drop_replication_slot('some_replication_slot');
pg_drop_replication_slot
-------------------------
+--------------------------
(1 row)
!\retcode rm -rf /tmp/some_isolation2_pg_basebackup;
@@ -42,14 +42,14 @@ pg_drop_replication_slot
-- When pg_basebackup runs without --slot
select pg_basebackup(address, port, null, '/tmp/some_isolation2_pg_basebackup') from gp_segment_configuration where content = 0 and role = 'p';
pg_basebackup
--------------
+---------------
(1 row)
-- Then there should NOT be a replication slot
0U: select count(1) from pg_get_replication_slots() where slot_name = 'some_replication_slot';
count
------
+-------
0
(1 row)
@@ -58,7 +58,7 @@ create extension if not exists gp_inject_fault;
CREATE
select gp_inject_fault_infinite('wal_sender_loop', 'suspend', 2);
gp_inject_fault_infinite
-------------------------
+--------------------------
t
(1 row)
!\retcode rm -rf /tmp/some_isolation2_pg_basebackup;
@@ -71,7 +71,7 @@ t
1&:select pg_basebackup(address, port, null, '/tmp/some_isolation2_pg_basebackup') from gp_segment_configuration where content = 0 and role = 'p'; <waiting ...>
SELECT gp_wait_until_triggered_fault('wal_sender_loop', 1, dbid) FROM gp_segment_configuration WHERE content = 0 AND role = 'p';
gp_wait_until_triggered_fault
------------------------------
+-------------------------------
t
(1 row)
@@ -79,24 +79,24 @@ t
-- 'gp_walreceiver' application name used by primary/mirror WAL sender
0U: select count(application_name) > 0 as has_replication_app_names from pg_stat_replication where application_name <> 'gp_walreceiver';
has_replication_app_names
--------------------------
+---------------------------
t
(1 row)
select gp_inject_fault('wal_sender_loop', 'resume', 2);
gp_inject_fault
----------------
+-----------------
t
(1 row)
select gp_inject_fault('wal_sender_loop', 'reset', 2);
gp_inject_fault
----------------
+-----------------
t
(1 row)
1<: <... completed>
pg_basebackup
--------------
+---------------
(1 row)
