1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

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>
This commit is contained in:
Peter Eisentraut
2016-10-19 12:00:00 -04:00
parent 5d58c07a44
commit e5a9bcb529
3 changed files with 5 additions and 11 deletions

View File

@ -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.