From b63872afbb4493810f0a6e9474912f5320a28332 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Wed, 15 Nov 2017 10:54:14 +0900 Subject: [PATCH] "witness register": set upstream_node_id to that of the primary --- repmgr-action-witness.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/repmgr-action-witness.c b/repmgr-action-witness.c index 5f48da80..af424d02 100644 --- a/repmgr-action-witness.c +++ b/repmgr-action-witness.c @@ -234,11 +234,10 @@ do_witness_register(void) /* these values are mandatory, setting them to anything else has no point */ node_record.type = WITNESS; node_record.priority = 0; - node_record.upstream_node_id = NO_UPSTREAM_NODE; + node_record.upstream_node_id = get_primary_node_id(primary_conn); if (record_status == RECORD_FOUND) { - record_created = update_node_record(primary_conn, "witness register", &node_record);