mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 08:56:29 +00:00
repmgrd: log reconnection of paired connection
This commit is contained in:
12
repmgrd.c
12
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,15 +922,15 @@ 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);
|
||||||
twice = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (paired_conn != NULL)
|
if (paired_conn != NULL)
|
||||||
{
|
{
|
||||||
log_debug("resetting paired connection");
|
log_debug("resetting paired connection");
|
||||||
*paired_conn = *conn;
|
*paired_conn = *conn;
|
||||||
}
|
}
|
||||||
|
twice = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user