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

Commit c71f9a0

Browse files
committed
Make pg_rewind test case more stable.
If replication is exceptionally slow for some reason, pg_rewind might run before the test row has been replicated. Add an explicit wait for it. Reported-by: Andres Freund Discussion: https://www.postgresql.org/message-id/20201120003811.iknhqwatitw2vvxf%40alap3.anarazel.de
1 parent 16f96c7 commit c71f9a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bin/pg_rewind/t/007_standby_source.pl

+4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@
8989
$node_a->safe_psql('postgres',
9090
"INSERT INTO tbl1 VALUES ('in A, after C was promoted')");
9191

92+
# make sure it's replicated to B before we continue
93+
$lsn = $node_a->lsn('insert');
94+
$node_a->wait_for_catchup('node_b', 'replay', $lsn);
95+
9296
# Also insert a new row in the standby, which won't be present in the
9397
# old primary.
9498
$node_c->safe_psql('postgres',

0 commit comments

Comments
 (0)