2.1. Prerequisites for setting up a basic replication cluster with ltcluster

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

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

Following software must be installed on both servers:

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

If you want ltcluster to copy configuration files which are located outside the LightDB 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 ltcluster, it's possible to use multiple LightDB instances running on different ports on the same computer, with passwordless SSH access to localhost enabled.