Using repmgr
As we stated previously, replication is great, provided that it works; it works well if it's understood, and it works even better if it's tested. This is a great reason to use the repmgr
utility.
repmgr
is an open source tool that was designed specifically for PostgreSQL replication. To get additional information about repmgr
, visit http://www.repmgr.org/.
The repmgr
utility provides a command-line interface (CLI) and a management process (daemon) that's used to monitor and manage PostgreSQL servers involved in replication. The repmgr
utility easily supports more than two nodes with automatic failover detection.
Getting ready
Install the repmgr
utility from binary packages on each PostgreSQL node.
Set up replication security and network access between nodes according to the Setting up streaming replication security recipe.
How to do it…
The repmgr
...