mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
After checking that master is alive, is_pgup() should return not keep
checking forever.
This commit is contained in:
@@ -160,7 +160,7 @@ is_pgup(PGconn *conn, int timeout)
|
|||||||
if (wait_connection_availability(conn, timeout) != 1)
|
if (wait_connection_availability(conn, timeout) != 1)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
|
||||||
continue;
|
break;
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
// we need to retry, because we might just have loose the connection once
|
// we need to retry, because we might just have loose the connection once
|
||||||
@@ -170,6 +170,7 @@ failed:
|
|||||||
twice = true;
|
twice = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -388,6 +388,7 @@ WitnessMonitor(void)
|
|||||||
* Execute the query asynchronously, but don't check for a result. We
|
* Execute the query asynchronously, but don't check for a result. We
|
||||||
* will check the result next time we pause for a monitor step.
|
* will check the result next time we pause for a monitor step.
|
||||||
*/
|
*/
|
||||||
|
log_debug("WitnessMonitor: %s\n", sqlquery);
|
||||||
if (PQsendQuery(primaryConn, sqlquery) == 0)
|
if (PQsendQuery(primaryConn, sqlquery) == 0)
|
||||||
log_warning(_("Query could not be sent to primary. %s\n"),
|
log_warning(_("Query could not be sent to primary. %s\n"),
|
||||||
PQerrorMessage(primaryConn));
|
PQerrorMessage(primaryConn));
|
||||||
@@ -532,6 +533,7 @@ StandbyMonitor(void)
|
|||||||
* Execute the query asynchronously, but don't check for a result. We
|
* Execute the query asynchronously, but don't check for a result. We
|
||||||
* will check the result next time we pause for a monitor step.
|
* will check the result next time we pause for a monitor step.
|
||||||
*/
|
*/
|
||||||
|
log_debug("StandbyMonitor: %s\n", sqlquery);
|
||||||
if (PQsendQuery(primaryConn, sqlquery) == 0)
|
if (PQsendQuery(primaryConn, sqlquery) == 0)
|
||||||
log_warning(_("Query could not be sent to primary. %s\n"),
|
log_warning(_("Query could not be sent to primary. %s\n"),
|
||||||
PQerrorMessage(primaryConn));
|
PQerrorMessage(primaryConn));
|
||||||
|
|||||||
Reference in New Issue
Block a user