On the master, perform these steps:
- Enable replication by setting a specific host access rule in pg_hba.conf.
- Give the selected replication user/role the REPLICATION and LOGIN attributes:
ALTER ROLE replogin REPLICATION;
- Alternatively, create it using this command:
CREATE ROLE replogin REPLICATION LOGIN;
On the standby, perform these steps:
- Request replication by setting primary_conninfo in recovery.conf
- If you are using SSL connections, use sslmode=verify-full
- Enable per-server rules, if any, for this server in pg_hba.conf.