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:
@ -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.
|
||||
|
Reference in New Issue
Block a user