Repmgr

From PostgreSQL wiki

Jump to: navigation, search

repmgr is a 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 (HA) 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
  • providing support for HA operations such as switch-overs and fail-overs.

repmgr is available via 2ndQuadrant’s YUM repository for the Red Hat family (RHEL, CentOS, and Fedora) and PGDG's APT repository for Debian. You can use standard yum and apt package managers for installing repmgr with your instance of PostgreSQL.

  • repmgr 3.x requires PostgreSQL 9.3 or higher
  • repmgr 2.x requires PostgreSQL 9.1 or 9.2

repmgr 3 Features

Current release: 3.1.4 (2016-07-12).

  • standby cloning with pg_basebackup or optionally rsync
  • Timeline following
    • a standby can be promoted to a master without requiring a restart
    • other standbys 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 master to another standby mode
  • Replication slot support (PostgreSQL 9.4 and later), simplifying WAL retention management
  • Switchover support
    • supports role-switching between master and standby

Downloads

The rempgr project is hosted at: https://github.com/2ndQuadrant/repmgr

Source code downloads are available from www.repmgr.org.

Installation instructions for RedHat/Debian-based distributions are available here.

Administrative code snippets

Personal tools