From PostgreSQL wiki
Jump to navigationJump to search

repmgr is a popular tool for PostgreSQL replication and failover management, introduced by 2ndQuadrant (now EDB) in 2010.

repmgr greatly simplifies the process of setting up and managing databases with high availability (HA) and scalability requirements. It helps DBAs and System Administrators manage a cluster of PostgreSQL databases by taking advantage of the Hot Standby capability introduced in PostgreSQL 9.

repmgr streamlines the process of administration and daily management, enhances productivity, complements built-in replication capabilities, and reduces overall costs of a PostgreSQL cluster by:

  • monitoring the replication process.
  • providing support for HA operations such as switchovers and failovers.

repmgr is available via the EDB package repositories as well as the PGDG community repositories. You can use standard yum and apt package managers for installing repmgr with your instance of PostgreSQL.

repmgr 5 Features

Current release: 5.3.3 (2022-10-17).

  • Implemented as a PostgreSQL extension
  • Replication cluster monitoring
  • Standby cloning with pg_basebackup or Barman
  • Timeline following:
    • a standby that can be promoted to a primary without requiring a restart
    • other standbys that can connect to the new master without being resynced
  • Cascading standby support
    • Standbys not directly connected to the master node are not affected during failover of the primary to another standby mode
  • Replication slot support , simplifying WAL retention management
  • Switchover support for role-switching between primary and standby


The repmgr project is hosted at

Source code downloads are available from

Package installation instructions for Red Hat/Debian-based distributions can be found here.


Administrative code snippets