mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +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 */
|
/* reconnect */
|
||||||
PQfinish(*conn);
|
PQfinish(*conn);
|
||||||
*conn = PQconnectdb(conninfo);
|
*conn = PQconnectdb(conninfo);
|
||||||
|
|
||||||
|
if (paired_conn != NULL)
|
||||||
|
{
|
||||||
|
log_debug("resetting paired connection");
|
||||||
|
*paired_conn = *conn;
|
||||||
|
}
|
||||||
twice = true;
|
twice = true;
|
||||||
}
|
}
|
||||||
else
|
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");
|
log_debug("check_upstream_connection(): upstream connection not available, resetting");
|
||||||
PQfinish(*conn);
|
PQfinish(*conn);
|
||||||
*conn = PQconnectdb(conninfo);
|
*conn = PQconnectdb(conninfo);
|
||||||
|
|
||||||
|
if (paired_conn != NULL)
|
||||||
|
{
|
||||||
|
log_debug("resetting paired connection");
|
||||||
|
*paired_conn = *conn;
|
||||||
|
}
|
||||||
twice = true;
|
twice = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paired_conn != NULL)
|
|
||||||
{
|
|
||||||
log_debug("resetting paired connection");
|
|
||||||
*paired_conn = *conn;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user