Postgresql – Removing a FAILED node from repmgr cluster

postgresqlrepmgr

How do I remove failed node from a PostgreSQL cluster?

postgres@db-prod-ms47ox-10-3-104-92:~$ repmgr -f /etc/repmgr/repmgr.conf cluster show
Role      | Connection String
* master  | host=db-prod-ms47ox-10-3-105-192.vandelay.io
  standby | host=db-prod-ms47ox-10-3-104-92.vandelay.io
  FAILED  | host=db-prod-lu8spc-10-3-104-145.vandelay.io

Running repmgr cluster cleanup does not remove this node and it appears to stop me from adding a new node into the cluster.

This is with repmgr 2.0 and postgres 9.1

Best Answer

As stated in https://groups.google.com/forum/#!topic/repmgr/R7osmnYLn4g :

probably an UNREGISTER command is needed for that, for now... just delete the entry from repl_nodes

This is done by accessing the master node with the same connection details used by repmgr and issuing the following:

DELETE FROM repmgr_<cluster name>.repl_nodes WHERE name = '<name>';