repmgr
Replication manager for PostgreSQL
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9710 | repmgr | No | Yes | Yes | Yes | No | No | repmgr |
| Related | pg_failover_slots bgw_replstatus pgautofailover pgpool_adm pglogical pgactive pglogical_ticker |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 5.5.0 | 1817161514 | repmgr | - |
| RPM | PGDG | 5.5.0 | 1817161514 | repmgr_$v | - |
| DEB | PGDG | 5.5.0 | 1817161514 | postgresql-$v-repmgr | - |
Install
You can install repmgr directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Preload:
Create Extension:
Usage
A suite of tools to manage replication and failover within a PostgreSQL cluster. Supports setting up standby servers, monitoring replication, and performing failover/switchover.
Enabling
Configuration
Create repmgr.conf on each node:
Register Primary
Clone and Register Standby
Monitoring
Manual Switchover
Promote a standby to primary (planned switchover):
Automatic Failover with repmgrd
Start the repmgr daemon on each node:
Configure failover in repmgr.conf:
Key Commands
repmgr primary register- register a primary noderepmgr standby clone- clone a standby from primaryrepmgr standby register- register a standby noderepmgr standby promote- promote standby to primaryrepmgr standby follow- follow a new primaryrepmgr standby switchover- planned switchoverrepmgr cluster show- display cluster statusrepmgr cluster event- show cluster eventsrepmgr node check- health check a node
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)