repmgr daemon pause

Name

repmgr daemon pause -- Instruct all repmgrd instances in the replication cluster to pause failover operations

Description

This command can be run on any active node in the replication cluster to instruct all running repmgrd instances to "pause" themselves, i.e. take no action (such as promoting themselves or following a new primary) if a failover event is detected.

This functionality is useful for performing maintenance operations, such as switchovers or upgrades, which might otherwise trigger a failover if repmgrd is running normally.

Note: It's important to wait a few seconds after restarting PostgreSQL on any node before running repmgr daemon pause, as the repmgrd instance on the restarted node will take a second or two before it has updated its status.

repmgr daemon unpause will instruct all previously paused repmgrd instances to resume normal failover operation.

Execution

repmgr daemon pause can be executed on any active node in the replication cluster. A valid repmgr.conf file is required. It will have no effect on previously paused nodes.

Example

$ repmgr -f /etc/repmgr.conf daemon pause
NOTICE: node 1 (node1) paused
NOTICE: node 2 (node2) paused
NOTICE: node 3 (node3) paused

Options

--dry-run

Check if nodes are reachable but don't pause repmgrd.

Exit codes

One of the following exit codes will be emitted by repmgr daemon unpause:

SUCCESS (0)

repmgrd could be paused on all nodes.

ERR_REPMGRD_PAUSE (26)

repmgrd could not be paused on one or mode nodes.

See also

repmgr daemon unpause, repmgr daemon status