repmgrd: fix "repmgrd_upstream_reconnect" event notification

Upstream node is not always the primary node.

Per report in GitHub #480.
This commit is contained in:
Ian Barwick
2018-08-16 14:57:11 +09:00
committed by Ian Barwick
parent c3949b2aea
commit 58994365ff

View File

@@ -772,7 +772,7 @@ monitor_streaming_standby(void)
upstream_node_unreachable_elapsed);
log_notice("%s", event_details.data);
create_event_notification(upstream_conn,
create_event_notification(primary_conn,
&config_file_options,
config_file_options.node_id,
"repmgrd_upstream_reconnect",
@@ -1314,7 +1314,7 @@ monitor_streaming_witness(void)
upstream_node_unreachable_elapsed);
log_notice("%s", event_details.data);
create_event_notification(upstream_conn,
create_event_notification(primary_conn,
&config_file_options,
config_file_options.node_id,
"repmgrd_upstream_reconnect",