If you want to use a node in another role, or if you want to remove it from the high availability cluster, you must unregister it.

You can run this command during the normal system operation.

Note: For the primary node to function normally, at least one standby node must always be running.

Prerequisites

To unregister a standby node, you must provide the node ID. To find the IP address, check the status of the cluster and locate the node. On that row, use the host value from the Connection string column to identify the IP address of the node. See Check the Status of a Database High Availability Cluster.

Procedure

  1. Log in or SSH as root to the OS of any of the running nodes in the cluster.
  2. Change the user to postgres.
    sudo -i -u postgres
  3. Unregister the node.
    /opt/vmware/vpostgres/current/bin/repmgr standby unregister --node-id=node ID -f /opt/vmware/vpostgres/current/etc/repmgr.conf

Results

Unregistering the node removes the record of the standby from the internal metadata table of the repmgr tool suite.