Allowing Access for the Replication User

In this section, you’ll configure access from the host and password authentication for the user you’ve just created.

For host access, you’ll configure the pg_hba.conf file that runs on the db01 instance. Rideshare has a sample HBA file you can reference in the postgresql directory. This file has a very specific format and can be tricky to work with if you’re brand new to it.

Refer to official documentation “The pg_hba.conf File”[338] for greater depth.

As you did before with the PostgreSQL config file, you might be wondering where the HBA file is located. Let’s find out. Run the following from your terminal:

 docker exec --user postgres -it db01 ​\
 psql -c ​"SHOW hba_file"

By default, ...

Get High Performance PostgreSQL for Rails now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.