standby/witness unregister - enable even if node isn't running

If the `--node` option is provided with the id of the node to unregister,
the action can be executed on any node.

This addresses GitHub #211.
This commit is contained in:
Ian Barwick
2016-08-02 17:00:25 +09:00
parent d0c05e6f46
commit c42437a4f2
4 changed files with 72 additions and 28 deletions

View File

@@ -940,13 +940,13 @@ recorded in the `repl_events` table.
Note that this command will not stop the server itself or remove
it from the replication cluster.
If the standby is not running, the standby record must be manually
removed from the `repl_nodes` table with e.g.:
If the standby is not running, the command can be executed on another
node by providing the id of the node to be unregistered using
the command line parameter `--node`, e.g. executing the following
command on the master server will unregister the standby with
id 3:
DELETE FROM repmgr_test.repl_nodes WHERE id = 3;
Adjust schema and node ID accordingly. A future `repmgr` release
will make it possible to unregister failed standbys.
repmgr standby unregister -f /etc/repmgr.conf --node=3
Automatic failover with `repmgrd`