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:
Ian Barwick
2018-08-15 16:55:03 +09:00
parent f2bc898761
commit b61f853a69

View File

@@ -760,6 +760,11 @@ monitor_streaming_standby(void)
{
int upstream_node_unreachable_elapsed = calculate_elapsed(upstream_node_unreachable_start);
if (upstream_node_info.type == PRIMARY)
{
primary_conn = upstream_conn;
}
initPQExpBuffer(&event_details);
appendPQExpBuffer(&event_details,