repmgr standby followrepmgr standby followrepmgr standby followattach a standby to a new primaryDescription
Attaches the standby to a new primary. This command requires a valid
repmgr.conf file for the standby, either specified
explicitly with -f/--config-file or located in a
default location; no additional arguments are required.
This command will force a restart of the standby server, which must be
running. It can only be used to attach an active standby to the current primary node
(and not to another standby).
To re-add an inactive node to the replication cluster, see
Example
$ repmgr -f /etc/repmgr.conf standby follow
INFO: setting node 3's primary to node 2
NOTICE: restarting server using "pg_ctl -l /var/log/postgres/startup.log -w -D '/var/lib/postgres/data' restart"
waiting for server to shut down........ done
server stopped
waiting for server to start.... done
server started
NOTICE: STANDBY FOLLOW successful
DETAIL: node 3 is now attached to node 2Options
Check prerequisites but don't actually follow a new standby.
This does not guarantee the standby can follow the primary; in
particular, whether the primary and standby timelines have diverged,
can currently only be determined by actually attempting to
attach the standby to the primary.
Wait for a primary to appear.
Event notifications
A standby_follow event notification will be generated.
See also