Configure the primary database
To configure the primary database, you need a Postgres user with a role that allows it to initialize streaming replication. This is the user each replica uses to stream from the primary database.
Configuring the primary database
On the primary database, as a user with superuser privileges, such as the
postgresuser, set the password encryption level toscram-sha-256:Create a new user called
repuser:
The scram-sha-256 encryption level is the most secure password-based authentication available in Postgres. It is only available in Postgres 10 and later.