repmgrd: handle manual failover mode correctly

This commit is contained in:
Ian Barwick
2017-07-19 14:01:01 +09:00
parent 23e6440dfd
commit a7b7d86ecc
2 changed files with 42 additions and 15 deletions

View File

@@ -1995,7 +1995,8 @@ clear_node_info_list(NodeInfoList *nodes)
/* close any open connections */
for (cell = nodes->head; cell; cell = cell->next)
{
if (cell->node_info->conn != NULL)
if (PQstatus(cell->node_info->conn) == CONNECTION_OK)
{
PQfinish(cell->node_info->conn);
cell->node_info->conn = NULL;