Setting up repmgr

repmgr is an open source tool developed by 2ndQuadrant for the purpose of managing replication and failover in a cluster of PostgreSQL servers. It builds on and enhances PostgreSQL server's existing capabilities to create new clones, that is, replicas, and add them to an existing cluster of PostgreSQL servers. In addition to this it is used to monitor replication setups and perform administrative tasks such as failover or manual switchover operations

In this recipe, we are going to set up the remgr tool.

How to do it...

There are two ways to install the repmgr tool:

  1. Through operating system package manager tools such as yum or apt-get install.
  2. Through the source installation by downloading the tar.gz from https://github.com/2ndQuadrant/repmgr/releases ...

Get PostgreSQL High Performance Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.