repmgr standby switchover

Name

repmgr standby switchover -- promote a standby to primary and demote the existing primary to a standby

Description

Promotes a standby to primary and demotes the existing primary to a standby. This command must be run on the standby to be promoted, and requires a passwordless SSH connection to the current primary.

If other standbys are connected to the demotion candidate, repmgr can instruct these to follow the new primary if the option --siblings-follow is specified.

Execution

Execute with the --dry-run option to test the switchover as far as possible without actually changing the status of either node.

repmgrd should not be active on any nodes while a switchover is being executed. This restriction may be lifted in a later version.

See also

For more details see the section Performing a switchover with repmgr.