Authentication and permission issues

Once we are past the initial stage, the next set of errors is a result of incorrect or missing entries in pg_hba.conf:, the host-based authentication file found under the data directory. The location/name of the file can be set using the hba_file parameter in postgresql.conf.

The most likely error we will see will be similar to the following:

psql: FATAL:  no pg_hba.conf entry for host "192.168.56.1", user "postgres", database "postgres"

The message mentions a host, a user, and a database. These are precisely the entries we should provide in pg_hba.conf. It has entries similar to the following screenshot:

Authentication and permission issues

The entry ...

Get PostgreSQL for Data Architects 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.