From 3ab22f9442b60bc326126d4395a5142383eb8c89 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 18 Oct 2018 12:17:06 +0900 Subject: [PATCH] repmgrd: ensure witness node doesn't try and follow another witness Theoretically there should never be more than one witness node visible here, but it's not impossible to rule it out, so add a check just in case. --- repmgrd-physical.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repmgrd-physical.c b/repmgrd-physical.c index a819dec5..31178833 100644 --- a/repmgrd-physical.c +++ b/repmgrd-physical.c @@ -1467,6 +1467,12 @@ monitor_streaming_witness(void) continue; } + /* skip node if configured as a witness node - we can't possibly "follow" that */ + if (cell->node_info->type == WITNESS) + { + continue; + } + cell->node_info->conn = establish_db_connection(cell->node_info->conninfo, false); if (PQstatus(cell->node_info->conn) != CONNECTION_OK)