Add "witness unregister" functionality

This commit is contained in:
Ian Barwick
2017-11-13 15:40:32 +09:00
parent a6cc4d80f0
commit 022d9c58c2
2 changed files with 115 additions and 12 deletions

View File

@@ -1149,6 +1149,7 @@ _get_primary_connection(PGconn *conn,
" CASE WHEN type = 'primary' THEN 1 ELSE 2 END AS type_priority"
" FROM repmgr.nodes "
" WHERE active IS TRUE "
" AND type != 'witness' "
"ORDER BY active DESC, type_priority, priority, node_id");
log_verbose(LOG_DEBUG, "get_primary_connection():\n%s", query.data);