mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
repmgrd: ensure primary connection handle is refreshed after reconnect
In some circumstances, if monitoring history was in use, repmgrd was attempting to fetch the primary's current LSN on a stale connection handle.
This commit is contained in:
@@ -760,6 +760,11 @@ monitor_streaming_standby(void)
|
|||||||
{
|
{
|
||||||
int upstream_node_unreachable_elapsed = calculate_elapsed(upstream_node_unreachable_start);
|
int upstream_node_unreachable_elapsed = calculate_elapsed(upstream_node_unreachable_start);
|
||||||
|
|
||||||
|
if (upstream_node_info.type == PRIMARY)
|
||||||
|
{
|
||||||
|
primary_conn = upstream_conn;
|
||||||
|
}
|
||||||
|
|
||||||
initPQExpBuffer(&event_details);
|
initPQExpBuffer(&event_details);
|
||||||
|
|
||||||
appendPQExpBuffer(&event_details,
|
appendPQExpBuffer(&event_details,
|
||||||
|
|||||||
Reference in New Issue
Block a user