I am customizing my configuration files, both pg_hba.conf
to allow LAN clients to access the DB on the machine and postgresql.conf
to tweak my DB engine.
By now I am just editing the files I've seen in guides, so in /etc/postgresql/{version}/main/pg_hba.conf
, its default location.
I noticed in the same root folder is also present a conf.d
folder: what can I put in this folder?
How can I be sure to save my customizations when postgresql updates?
I would be more inclined towards making something like my_pg_hba.conf
and put it into the conf.d
folder: will this work? How can I accomplish something like this?
1 Answer 1
Yes, that should work, as long as the main pg_hba.conf
contains a line like
include_dir conf.d
PostgreSQL will never overwrite or modify pg_hba.conf
if you install new software. It is up to you to copy that file to the new cluster when you perform a major upgrade, along with all included files.