repmgr: assume node is actually shutting down if pingable and that's the reported status

This commit is contained in:
Ian Barwick
2018-01-12 21:53:37 +09:00
committed by Ian Barwick
parent 54b5c8ad94
commit 3d6437c8f8
4 changed files with 29 additions and 14 deletions

View File

@@ -2668,6 +2668,8 @@ do_standby_switchover(void)
i + 1, config_file_options.reconnect_attempts);
ping_res = PQping(remote_conninfo);
log_debug("ping status is: %s", print_pqping_status(ping_res));
/* database server could not be contacted */
if (ping_res == PQPING_NO_RESPONSE || ping_res == PQPING_NO_ATTEMPT)
{
@@ -2732,6 +2734,7 @@ do_standby_switchover(void)
termPQExpBuffer(&command_output);
}
log_debug("sleeping %i seconds until next check", config_file_options.reconnect_interval);
sleep(config_file_options.reconnect_interval);
}