repmgr: improve replication status checking during switchover

When checking the new standby's record in pg_stat_replication, keep
polling until the expected status is reported, and only give up
after a timeout was exceeded.

Previously repmgr would report an error if status was "startup",
even though this is not a problem.
This commit is contained in:
Ian Barwick
2016-11-01 16:34:32 +09:00
parent 556ff3c311
commit bb842c3989
2 changed files with 74 additions and 49 deletions

View File

@@ -1513,7 +1513,6 @@ do_master_failover(void)
*/
if (PQstatus(node_conn) != CONNECTION_OK)
{
/* XXX */
log_info(_("At this point, it could be some race conditions "
"that are acceptable, assume the node is restarting "
"and starting failover procedure\n"));