mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
Improve messages in wait_connection_availability, so we know what
error makes the failover procedure to start By gripe from Andres Freund
This commit is contained in:
@@ -409,7 +409,7 @@ wait_connection_availability(PGconn *conn, int timeout)
|
|||||||
{
|
{
|
||||||
if (PQconsumeInput(conn) == 0)
|
if (PQconsumeInput(conn) == 0)
|
||||||
{
|
{
|
||||||
log_warning(_("PQconsumeInput: Query could not be sent to primary. %s\n"),
|
log_warning(_("wait_connection_availability: could not receive data from master. %s\n"),
|
||||||
PQerrorMessage(conn));
|
PQerrorMessage(conn));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -425,8 +425,10 @@ wait_connection_availability(PGconn *conn, int timeout)
|
|||||||
}
|
}
|
||||||
if (timeout >= 0)
|
if (timeout >= 0)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else {
|
||||||
|
log_warning(_("wait_connection_availability: timeout reached");
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user