In this recipe, we are going to set up a master/slave streaming replication.
For this exercise, you need two Linux machines each with the latest version of PostgreSQL 9.6 installed. We will be using the following IP addresses for master and slave servers:
The following steps show you how to set up master/slave streaming replication:
psql -c "CREATE USER repuser REPLICATION LOGIN ENCRYPTED ...