Free Database Audit: comprehensive health report for your database

Learn More
Lightweight PostgreSQL Replication

When Patroni Is Overkill — repmgr Delivers PostgreSQL HA Without the Complexity

repmgr manages PostgreSQL streaming replication and standby promotion with zero dependency on etcd, Consul, or Kubernetes. It is the right tool for teams that want reliable PostgreSQL replication without running a distributed coordination cluster.

How repmgr Works

repmgr is a PostgreSQL extension and CLI toolset from 2ndQuadrant (now EDB). It registers primary and standby nodes, manages replication slots, clones standbys, and — via the optional repmgrd daemon — performs automatic failover when a primary becomes unreachable.

No External DCS

repmgr stores cluster state inside PostgreSQL itself — no etcd, Consul, or ZooKeeper cluster to run and maintain. Ideal for simpler environments.

repmgrd Auto Failover

The repmgrd daemon monitors the primary. On failure, it promotes the most up-to-date standby and notifies other nodes to follow the new primary.

Barman Integration

First-class integration with Barman for physical backups. repmgr can clone standbys directly from a Barman backup, reducing load on the primary during standby setup.

Cascading Replication

Register standbys that replicate from other standbys rather than the primary — useful for geographically distributed read replicas without overloading primary bandwidth.

Simple CLI Operations

repmgr standby switchover, repmgr standby clone, repmgr cluster show — a small set of commands that are easy for DBAs to learn and use in runbooks.

Upgrade-Safe Architecture

repmgr uses PostgreSQL's own replication protocol with no wrapping layer, making it straightforward to upgrade PostgreSQL versions without tool-specific complications.

repmgr vs Patroni — Side by Side

Both tools manage PostgreSQL replication and failover, but their architectures are fundamentally different. The right choice depends on your infrastructure and operational maturity.

Featurerepmgr ✦Patroni
External DCS required (etcd/Consul)
Automatic failover (daemon)
Kubernetes-native integration
Barman backup integration
Minimal installation complexity
REST API for cluster ops
Works on bare-metal / plain VMs
Cascading replication support
Manual switchover CLI
PostgreSQL extension integration

When repmgr Beats Patroni

Ideal scenarios for repmgr

  • • PostgreSQL on VMs or bare-metal (not Kubernetes)
  • • Team unfamiliar with etcd/Consul distributed systems
  • • You already use Barman for backup — repmgr integrates natively
  • • Manual or semi-automated failover is acceptable for your SLA
  • • Small-to-medium scale (1 primary + 1–3 standbys)
  • • You want to avoid the operational overhead of a DCS cluster
  • • EDB subscription or support contract already in place

Upgrade to Patroni when…

  • • You move PostgreSQL to Kubernetes
  • • You need sub-30-second automatic failover with strong consistency guarantees
  • • You need REST API integration with infrastructure automation
  • • Multi-DC or multi-region HA with consensus-based leader election
  • • You use Zalando Operator, Crunchy PGO, or CloudNativePG

JusDB repmgr Implementation Service

We set up and operate repmgr clusters with full documentation, monitoring, and tested failover runbooks.

Cluster Installation & Registration

Install repmgr extension, configure repmgr.conf, register primary and all standby nodes with the repmgr metadata database.

repmgrd Auto-failover Setup

Deploy and configure the repmgrd daemon, tune failover thresholds (reconnect_attempts, reconnect_interval), and test promotion scenarios.

Barman Backup Integration

Configure repmgr to use Barman as the clone source for new standbys, reducing load on primary during clone operations and enabling PITR from Barman backups.

Cascading Standby Configuration

Set up multi-tier replication for geographically distributed read replicas with proper upstream standby configuration.

Switchover Runbooks

Document and test planned switchover procedures (repmgr standby switchover) for zero-downtime maintenance windows.

Monitoring & Alerting

repmgr cluster show integrated into monitoring pipelines, alerting on replication lag, standby disconnection, and repmgrd health.

FAQ

Set up repmgr the right way

JusDB implements and operates repmgr clusters with tested failover procedures and 24/7 monitoring — so you can focus on your application.