hba_file

A server parameter specifying the location of pg_hba.conf

hba_file is a configuration parameter specifying the location of the main pg_hba.conf file.

hba_file was added in PostgreSQL 8.0.

Usage

The default pg_hba.conf file is placed by initdb in the generated data directory and unless explictly set, hba_file points to this file.

If the file pointed to by hba_file does not exist or cannot be read, a FATAL message will be emitted at startup.

Default value

The default value for hba_file is: data_directory/pg_hba.conf.

Change history

Examples

Log output when hba_file points to a non-existent file:

[2022-08-22 09:18:11 UTC]    LOG:  00000: listening on Unix socket "/tmp/.s.PGSQL.5432"
[2022-08-22 09:18:11 UTC]    LOG:  58P01: could not open configuration file "/var/lib/pgsql/hba.conf": No such file or directory
[2022-08-22 09:18:11 UTC]    FATAL:  XX000: could not load pg_hba.conf
[2022-08-22 09:18:11 UTC]    LOG:  00000: database system is shut down

Categories

Configuration, GUC configuration item

See also

pg_hba.conf, config_file, ident_file