0

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?

asked Nov 21, 2023 at 14:23

1 Answer 1

2

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.

answered Nov 21, 2023 at 14:31

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.