mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
repmgrd: log reconnection of paired connection
This commit is contained in:
18
repmgrd.c
18
repmgrd.c
@@ -884,6 +884,12 @@ check_upstream_connection(PGconn **conn, const char *conninfo, PGconn **paired_c
|
||||
/* reconnect */
|
||||
PQfinish(*conn);
|
||||
*conn = PQconnectdb(conninfo);
|
||||
|
||||
if (paired_conn != NULL)
|
||||
{
|
||||
log_debug("resetting paired connection");
|
||||
*paired_conn = *conn;
|
||||
}
|
||||
twice = true;
|
||||
}
|
||||
else
|
||||
@@ -916,16 +922,16 @@ check_upstream_connection(PGconn **conn, const char *conninfo, PGconn **paired_c
|
||||
log_debug("check_upstream_connection(): upstream connection not available, resetting");
|
||||
PQfinish(*conn);
|
||||
*conn = PQconnectdb(conninfo);
|
||||
|
||||
if (paired_conn != NULL)
|
||||
{
|
||||
log_debug("resetting paired connection");
|
||||
*paired_conn = *conn;
|
||||
}
|
||||
twice = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (paired_conn != NULL)
|
||||
{
|
||||
log_debug("resetting paired connection");
|
||||
*paired_conn = *conn;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user