repmgr is the most popular tool for PostgreSQL failover, introduced by 2ndQuadrant in 2010  

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

repmgr simplifies administration and daily management, enhances productivity and reduces the overall costs of a PostgreSQL cluster by:

  • Monitoring the replication process
  • Allowing DBAs to issue high availability operations such as switch-overs and fail-overs.


repmgr v4.2 released - October 24, 2018

repmgr is available via 2ndQuadrant’s YUM repository for the Red Hat family (RHEL, CentOS, and Fedora) and PGDG's APT repository for Debian (please use the test repository for the Beta version - more details at the installation instruction link below). You can use standard yum and apt package managers for installing repmgr with your instance of PostgreSQL. 

(repmgr requires PostgreSQL 9.3 or higher)

Click here to view detailed installation instructions using yum and apt

Click here to download the latest tarball

Click here to view the release notes



The images and explanation below represent some of the most common configurations of repmgr in production databases. 

1 Primary + 1 Standby

Here, repmgr is configured on Standby for failover in case the Primary node fails. 

1 Primary + 2 Standbys

Here, repmgr is configured on 2 Standby nodes for failover in case the Primary node fails. Additional Standby node is configured for High Availability (HA) so at least one Standby is still present after failover. 

1 Primary + 3 Standbys + 1 Witness

Here, the Standby in Location B is a last resort in case Location A becomes entirely unavailable. The Witness server here ensures that in case of network interruption between the two locations, the Standby at Location B does not promote itself to Primary, i.e. prevents the Split Brain scenario. 


repmgr is free and open-source software licensed under the GNU Public License (GPL) v3. This means you are free to use and modify repmgr as you see fit, however any modifications you make may only be distributed under the same terms. Click here for details.

Need more help?

Click here for repmgr's documentation.

You can also raise your queries on repmgr's Google group

Want to know even more? Need some help to implement repmgr? As the developers we're the best people in the world to help you get up and running with repmgr. We have consultants available to provide assistance, plus our unique 24/7 Production Support subscription service also covers repmgr.   

Complete the contact form below and we'll be in touch.

All fields are required


2ndQuadrant Updates

Stay in touch with us

Subscribe to our monthly newsletter to hear the latest developments from 2ndQuadrant and related technologies.

We’ll also send you any important news or updates that we think you’ll find useful.

We value your privacy and will not pass your details on to anyone else.

Cookie Settings

2ndQuadrant Updates