mirror of
https://github.com/postgres/postgres.git
synced 2025-08-08 06:02:22 +03:00
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
This commit is contained in:
@@ -89,6 +89,10 @@ $node_c->safe_psql('postgres', "checkpoint");
|
|||||||
$node_a->safe_psql('postgres',
|
$node_a->safe_psql('postgres',
|
||||||
"INSERT INTO tbl1 VALUES ('in A, after C was promoted')");
|
"INSERT INTO tbl1 VALUES ('in A, after C was promoted')");
|
||||||
|
|
||||||
|
# make sure it's replicated to B before we continue
|
||||||
|
$lsn = $node_a->lsn('insert');
|
||||||
|
$node_a->wait_for_catchup('node_b', 'replay', $lsn);
|
||||||
|
|
||||||
# Also insert a new row in the standby, which won't be present in the
|
# Also insert a new row in the standby, which won't be present in the
|
||||||
# old primary.
|
# old primary.
|
||||||
$node_c->safe_psql('postgres',
|
$node_c->safe_psql('postgres',
|
||||||
|
Reference in New Issue
Block a user