repmgr
Replication manager for PostgreSQL
repmgr : Replication manager for PostgreSQL
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLd-- | No | Yes | Yes | Yes | no | no |
| Relationships | |
|---|---|
| Schemas | repmgr |
| See Also | pg_failover_slots bgw_replstatus pgautofailover pgpool_adm pglogical pgactive pglogical_ticker |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PGDG | 5.5.0 |
18 17 16 15 14 | repmgr |
- |
| RPM | PGDG | 5.5.0 |
18 17 16 15 14 | repmgr_$v |
- |
| DEB | PGDG | 5.5.0 |
18 17 16 15 14 | postgresql-$v-repmgr |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| el8.aarch64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| el9.x86_64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| el9.aarch64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| el10.x86_64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| el10.aarch64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| d12.x86_64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| d12.aarch64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| d13.x86_64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| d13.aarch64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| u22.x86_64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| u22.aarch64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| u24.x86_64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| u24.aarch64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| u26.x86_64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
| u26.aarch64 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 | PGDG 5.5.0 |
Source
github.com/EnterpriseDB/repmgr
Install
Make sure PGDG repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
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