From http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html, it says:
A default pg_hba.conf file is installed when the data directory is initialized by initdb.
I would assume when I run initdb
, it will generate a file at /var/lib/pgsql/9.1/data/pg_hba.conf
. However, it also generates a file at /var/lib/pgsql/pg_hba.conf
.
Could anyone explain how do I end up with two pg_hba.conf with different content?
Which one eventually will be used?
ls -l /var/lib/pgsql/9.1/data/pg_hba.conf /var/lib/pgsql/pg_hba.conf
? Is one a link to the other? Also check if they are different:diff /var/lib/pgsql/pg_hba.conf /var/lib/pgsql/9.1/data/pg_hba.conf