aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/RewindTest.pm
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2016-10-19 12:00:00 -0400
committerPeter Eisentraut <peter_e@gmx.net>2016-10-19 09:18:50 -0400
commite5a9bcb529c474a07d1aa077665c5fade4c83cfc (patch)
tree87a5d5e4f27655b2cf6172ebf2f58bad3a322781 /src/bin/pg_rewind/RewindTest.pm
parent5d58c07a441414ae29a8e315d2f9868d3d8e20be (diff)
downloadpostgresql-e5a9bcb529c474a07d1aa077665c5fade4c83cfc.tar.gz
postgresql-e5a9bcb529c474a07d1aa077665c5fade4c83cfc.zip
Use pg_ctl promote -w in TAP tests
Switch TAP tests to use the new wait mode of pg_ctl promote. This allows avoiding extra logic with poll_query_until() to be sure that a promoted standby is ready for read-write queries. From: Michael Paquier <michael.paquier@gmail.com>
Diffstat (limited to 'src/bin/pg_rewind/RewindTest.pm')
-rw-r--r--src/bin/pg_rewind/RewindTest.pm6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index c7c3a8f45c6..1c482617add 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -161,12 +161,8 @@ sub promote_standby
or die "Timed out while waiting for standby to receive and write WAL";
# Now promote slave and insert some new data on master, this will put
- # the master out-of-sync with the standby. Wait until the standby is
- # out of recovery mode, and is ready to accept read-write connections.
+ # the master out-of-sync with the standby.
$node_standby->promote;
- $node_standby->poll_query_until('postgres',
- "SELECT NOT pg_is_in_recovery()")
- or die "Timed out while waiting for promotion of standby";
# Force a checkpoint after the promotion. pg_rewind looks at the control
# file to determine what timeline the server is on, and that isn't updated