One thing we must remember before attempting to rejoin a node to the cluster is that doing so will necessarily eliminate potential diagnostic information from the node. In the event that pgha2 becomes the primary because pgha1 failed, we would want to investigate to gather information, and potentially try to recover data if there was evidence of a split-brain state.
Assuming that this is not the case, or that we've otherwise decided that the old primary is reusable, we must then ensure that PostgreSQL has been stopped. The repmgr rejoin process only works if PostgreSQL is not running. This is because several base files will require modification, and the primary_conninfo streaming parameter requires a service restart in any ...