Commit 6deb52b2 authored by Peter Eisentraut's avatar Peter Eisentraut

Remove unnecessary pg_is_in_recovery calls in tests

Since pg_ctl promote already waits for recovery to end, these calls are
obsolete.
parent 1bac5f55
......@@ -55,8 +55,6 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
system_or_bail('pg_ctl', '-D', $standby->data_dir, 'promote');
$standby->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
or die "standby never exited recovery";
$standby->safe_psql('postgres', "create table t11()");
my $standby_ts = $standby->safe_psql('postgres',
......
......@@ -83,8 +83,6 @@ $node_standby->poll_query_until('postgres', $caughtup_query)
# Promote 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";
$node_standby->psql('postgres', 'checkpoint');
# Restart to discard in-memory copy of FSM
......
......@@ -215,8 +215,6 @@ $cur_master->psql(
PREPARE TRANSACTION 'xact_009_10';");
$cur_master->teardown_node;
$cur_slave->promote;
$cur_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
or die "Timed out while waiting for promotion of standby " . $cur_slave->name;
# change roles
note "Now paris is master and london is slave";
......@@ -254,8 +252,6 @@ $cur_master->psql(
$cur_master->stop;
$cur_slave->restart;
$cur_slave->promote;
$cur_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
or die "Timed out while waiting for promotion of standby " . $cur_slave->name;
# change roles
note "Now london is master and paris is slave";
......@@ -296,8 +292,6 @@ $cur_master->stop;
$cur_slave->teardown_node;
$cur_slave->start;
$cur_slave->promote;
$cur_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
or die "Timed out while waiting for promotion of standby " . $cur_slave->name;
# change roles
note "Now paris is master and london is slave";
......
......@@ -137,10 +137,6 @@ $node_master->safe_psql('postgres', 'CHECKPOINT');
$node_master->stop('immediate');
$node_replica->promote;
print "waiting for replica to come up\n";
$node_replica->poll_query_until('postgres',
"SELECT NOT pg_is_in_recovery();")
or die "replica never exited recovery";
$node_replica->safe_psql('postgres',
"INSERT INTO decoding(blah) VALUES ('after failover');");
......
......@@ -109,8 +109,6 @@ $node_slave->psql(
is($psql_out, '8128', "Visible");
$node_master->stop;
$node_slave->promote;
$node_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
or die "Timed out while waiting for promotion of standby";
$node_slave->psql(
'postgres',
......@@ -162,8 +160,6 @@ $node_slave->psql(
is($psql_out, '-1', "Not visible");
$node_master->stop;
$node_slave->promote;
$node_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
or die "Timed out while waiting for promotion of standby";
$node_slave->psql(
'postgres',
......@@ -205,8 +201,6 @@ $node_slave->psql(
is($psql_out, '-1', "Not visible");
$node_master->stop;
$node_slave->promote;
$node_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
or die "Timed out while waiting for promotion of standby";
$node_slave->psql(
'postgres',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment