3.1. Prerequisites for setting up a basic replication cluster with repmgr

The following section will describe how to set up a basic replication cluster with a primary and a standby server using the repmgr command line tool.

We'll assume the primary is called node1 with IP address, and the standby is called node2 with IP address

Following software must be installed on both servers:

At network level, connections between the PostgreSQL port (default: 5432) must be possible in both directions.

If you want repmgr to copy configuration files which are located outside the PostgreSQL data directory, and/or to test switchover functionality, you will also need passwordless SSH connections between both servers, and rsync should be installed.

Tip: For testing repmgr, it's possible to use multiple PostgreSQL instances running on different ports on the same computer, with passwordless SSH access to localhost enabled.