From: Andres Freund Date: Tue, 11 Apr 2023 18:17:36 +0000 (-0700) Subject: 035_standby_logical_decoding: Add missing waits for replication X-Git-Tag: REL_16_BETA1~228 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=57411c82ce8634888be807502ee6c50f219e0460;p=thirdparty%2Fpostgresql.git 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 Author: "Drouvot, Bertrand" Discussion: https://postgr.es/m/20230411053657.GA1177147@rfd.leadboat.com --- diff --git a/src/test/recovery/t/035_standby_logical_decoding.pl b/src/test/recovery/t/035_standby_logical_decoding.pl index ba98a18bd20..94a8384c31c 100644 --- a/src/test/recovery/t/035_standby_logical_decoding.pl +++ b/src/test/recovery/t/035_standby_logical_decoding.pl @@ -653,9 +653,15 @@ $node_standby->reload; $node_primary->psql('postgres', q[CREATE DATABASE testdb]); $node_primary->safe_psql('testdb', qq[CREATE TABLE decoding_test(x integer, y text);]); +# Wait for the standby to catchup before creating the slots +$node_primary->wait_for_replay_catchup($node_standby); + # create the logical slots create_logical_slots($node_standby, 'promotion_'); +# Wait for the cascading standby to catchup before creating the slots +$node_standby->wait_for_replay_catchup($node_cascading_standby, $node_primary); + # create the logical slots on the cascading standby too create_logical_slots($node_cascading_standby, 'promotion_');