Chapter 13. repmgrd setup and configuration

Table of Contents

13.1. repmgrd configuration
13.1.1. Required configuration for automatic failover
13.1.2. Optional configuration for automatic failover
13.1.3. Configuring repmgrd and pgbouncer to fence a failed primary node
13.1.4. PostgreSQL service configuration
13.1.5. repmgrd service configuration
13.1.6. Monitoring configuration
13.1.7. Applying configuration changes to repmgrd
13.2. repmgrd daemon
13.2.1. repmgrd's PID file
13.2.2. repmgrd daemon configuration on Debian/Ubuntu
13.3. repmgrd connection settings
13.4. repmgrd log rotation

repmgrd is a daemon process which runs on each PostgreSQL node, monitoring the local node, and (unless it's the primary node) the upstream server (the primary server or with cascading replication, another standby) which it's connected to.

repmgrd can be configured to provide failover capability in case the primary or upstream node becomes unreachable, and/or provide monitoring data to the repmgr metadatabase.

From repmgr 4.4, when running on the primary node, repmgrd can also monitor standby disconnections/reconnections (see Monitoring standby disconnections on the primary).