From e5a9bcb529c474a07d1aa077665c5fade4c83cfc Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 19 Oct 2016 12:00:00 -0400 Subject: 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 --- src/test/perl/PostgresNode.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/test/perl/PostgresNode.pm') diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index 6e5a75a050b..c1b16ca9e9e 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -723,7 +723,7 @@ sub restart =item $node->promote() -Wrapper for pg_ctl promote +Wrapper for pg_ctl promote -w =cut @@ -735,7 +735,8 @@ sub promote my $logfile = $self->logfile; my $name = $self->name; print "### Promoting node \"$name\"\n"; - TestLib::system_log('pg_ctl', '-D', $pgdata, '-l', $logfile, 'promote'); + TestLib::system_log('pg_ctl', '-D', $pgdata, '-w', '-l', $logfile, + 'promote'); } # Internal routine to enable streaming replication on a standby node. -- cgit v1.2.3