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

Lines changed: 4 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy