diff --git a/repmgrd-physical.c b/repmgrd-physical.c index bfd41c09..a819dec5 100644 --- a/repmgrd-physical.c +++ b/repmgrd-physical.c @@ -1019,6 +1019,13 @@ monitor_streaming_standby(void) continue; } + /* skip 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) @@ -1041,6 +1048,7 @@ monitor_streaming_standby(void) follow_new_primary(follow_node_id); } } + clear_node_info_list(&sibling_nodes); } } @@ -2419,6 +2427,8 @@ follow_new_primary(int new_primary_id) RecordStatus record_status = RECORD_NOT_FOUND; bool new_primary_ok = false; + log_verbose(LOG_DEBUG, "follow_new_primary(): new primary id is %i", new_primary_id); + record_status = get_node_record(local_conn, new_primary_id, &new_primary); if (record_status != RECORD_FOUND)