REPMGR supports automatic failover. In a case of a failover – we need to “REJOIN” the fallen node to the cluster manually with the following commands:

sudo su -
systemctl stop postgresql-10
su  postgres
cd ~
PGPASSWORD=<postgres user password> /usr/pgsql-10/bin/repmgr -f /etc/repmgr/10/repmgr.conf -h <new primary ip> -U repuser -d postgres standby clone --force-rewind --force
systemctl start postgresql-10
su postgres
/usr/pgsql-10/bin/repmgr standby register --force

If the failover does not work use the following command on the standby DB machine:

  1. su - postgres
  2. /usr/pgsql-10/bin/repmgr standby promote

Need more help with this?
Click here to open a Support ticket

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.