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.
This commit is contained in:
Ian Barwick
2018-10-18 12:17:06 +09:00
parent d1d057a184
commit 3907a545b0

View File

@@ -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)