If the primary node in your database high availability cluster fails and you promote a new primary, you must unregister the failed primary node to remove it from the cluster and avoid inconsistent cluster status data.


  • To unregister a primary node that is not running, 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.
  • Verify that the failed primary is inactive and without any following standby nodes, and promote a new primary.


  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. (Optional) To verify that the prerequisites for unregistering the node are met, run the command with the --dry-run option .
    /opt/vmware/vpostgres/current/bin/repmgr primary unregister --node-id=node ID --dry-run
  4. Unregister the node.
    /opt/vmware/vpostgres/current/bin/repmgr primary unregister --node-id=node ID


The operation removes the node from the repmgr metadata.