Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 57411c8

Browse files
committed
035_standby_logical_decoding: Add missing waits for replication
At least one slow buildfarm system (hoverfly) showed that the database creation was not replicated before we try to create logical replication slots on the standby, in that database. Reported-by: Noah Misch <noah@leadboat.com> Author: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com> Discussion: https://postgr.es/m/20230411053657.GA1177147@rfd.leadboat.com
1 parent bc25d6c commit 57411c8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/recovery/t/035_standby_logical_decoding.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,15 @@ sub check_for_invalidation
653653
$node_primary->psql('postgres', q[CREATE DATABASE testdb]);
654654
$node_primary->safe_psql('testdb', qq[CREATE TABLE decoding_test(x integer, y text);]);
655655

656+
# Wait for the standby to catchup before creating the slots
657+
$node_primary->wait_for_replay_catchup($node_standby);
658+
656659
# create the logical slots
657660
create_logical_slots($node_standby, 'promotion_');
658661

662+
# Wait for the cascading standby to catchup before creating the slots
663+
$node_standby->wait_for_replay_catchup($node_cascading_standby, $node_primary);
664+
659665
# create the logical slots on the cascading standby too
660666
create_logical_slots($node_cascading_standby, 'promotion_');
661667

0 commit comments

Comments
 (0)