diff --git a/src/test/recovery/t/009_twophase.pl b/src/test/recovery/t/009_twophase.pl index 879e493b5b8..2cc57070eba 100644 --- a/src/test/recovery/t/009_twophase.pl +++ b/src/test/recovery/t/009_twophase.pl @@ -222,6 +222,7 @@ $cur_primary->psql( SAVEPOINT s1; INSERT INTO t_009_tbl VALUES (22, 'issued to ${cur_primary_name}'); PREPARE TRANSACTION 'xact_009_10';"); +$cur_primary->wait_for_replay_catchup($cur_standby); $cur_primary->teardown_node; $cur_standby->promote; @@ -254,6 +255,7 @@ $cur_primary->psql( SAVEPOINT s1; INSERT INTO t_009_tbl VALUES (24, 'issued to ${cur_primary_name}'); PREPARE TRANSACTION 'xact_009_11';"); +$cur_primary->wait_for_replay_catchup($cur_standby); $cur_primary->stop; $cur_standby->restart; $cur_standby->promote; @@ -289,6 +291,7 @@ $cur_primary->psql( INSERT INTO t_009_tbl VALUES (26, 'issued to ${cur_primary_name}'); PREPARE TRANSACTION 'xact_009_12'; "); +$cur_primary->wait_for_replay_catchup($cur_standby); $cur_primary->stop; $cur_standby->teardown_node; $cur_standby->start;