This is an automated email from the ASF dual-hosted git repository.

reshke pushed a commit to branch fix_for_db_records
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit db3224c6a83ec257f48d6af80fa97bd7778ba992
Author: Alvaro Herrera <[email protected]>
AuthorDate: Fri Jul 29 12:50:47 2022 +0200

    Fix test instability
    
    On FreeBSD, the new test fails due to a WAL file being removed before
    the standby has had the chance to copy it.  Fix by adding a replication
    slot to prevent the removal until after the standby has connected.
    
    Author: Kyotaro Horiguchi <[email protected]>
    Reported-by: Matthias van de Meent <[email protected]>
    Discussion: 
https://postgr.es/m/caeze2wj5nau_qpjbwihvmxlfkawoz5tkdbnqoc6nksirjeo...@mail.gmail.com
---
 src/test/recovery/t/033_replay_tsp_drops.pl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/test/recovery/t/033_replay_tsp_drops.pl 
b/src/test/recovery/t/033_replay_tsp_drops.pl
index ee6deebf9c7..fb0b6150f27 100644
--- a/src/test/recovery/t/033_replay_tsp_drops.pl
+++ b/src/test/recovery/t/033_replay_tsp_drops.pl
@@ -24,6 +24,7 @@ sub test_tablespace
                        CREATE TABLESPACE source_ts  LOCATION '';
                        CREATE TABLESPACE target_ts  LOCATION '';
                        CREATE DATABASE template_db IS_TEMPLATE = true;
+                       SELECT pg_create_physical_replication_slot('slot', 
true);
                ]);
        my $backup_name = 'my_backup';
        $node_primary->backup($backup_name);
@@ -38,10 +39,11 @@ sub test_tablespace
        # Make sure connection is made
        $node_primary->poll_query_until('postgres',
                'SELECT count(*) = 1 FROM pg_stat_replication');
+       $node_primary->safe_psql('postgres', "SELECT 
pg_drop_replication_slot('slot')");
 
        $node_standby->safe_psql('postgres', 'CHECKPOINT');
 
-       # Do immediate shutdown just after a sequence of CREAT DATABASE / DROP
+       # Do immediate shutdown just after a sequence of CREATE DATABASE / DROP
        # DATABASE / DROP TABLESPACE. This causes CREATE DATABASE WAL records
        # to be applied to already-removed directories.
        my $query = q[


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to