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:
Through operating system package manager tools such as
yum
orapt-get install
.Through the source installation by downloading the
tar.gz
from https://github.com/2ndQuadrant/repmgr/releases. Or by downloading the GitHub repository via thegit clone
command from the repmgr GitHub page.
In this recipe, we will be using the standard package manager tools to install repmgr.
For this recipe we will need at least two servers...