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 own 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 4.x is compatible with all PostgreSQL versions from PostgreSQL 9.3 onwards.


repmgr 4 Features

Current release: 4.1 (2018-07-31).

  • Implemented as a PostgreSQL extension
  • Replication cluster monitoring
  • Standby cloning with pg_basebackup or from Barman
  • Timeline following
    • a standby can be promoted to a primary 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 primary and standby

Downloads

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

Source code downloads are available from repmgr.org.

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

Administrative code snippets

Personal tools