0

On a Ubuntu 16.04 (Xenial) machine, I used apt-get install postgresql postgresql-contrib to install postgresql 9.5 anew. To my surprise, by default it's finding the config files in the data directory as evidenced by:

postgres=# show hba_file;
                 hba_file                 
------------------------------------------
 /var/lib/postgresql/9.5/main/pg_hba.conf

I would prefer they be in /etc/postgresql/9.5/main I have searched the docs for this answer and it eludes me.

How can I configure the server to always find them there, even after a restart (hence, making the configuration "sticky"?

Thanks

Michael Lupo
  • 326
  • 3
  • 17

1 Answers1

0

The confusion stemmed from something being wrong with my install. I followed the instructions from here to utterly remove and reinstall postgresql cleanly.

Once I performed the clean install, I can see that the configuration file is being found in the expected path as evidenced below:

ps aux | grep postgresql
postgres  4386  0.0  0.2 294872 22884 ?        S    16:35   0:00 /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5/main -c config_file=/etc/postgresql/9.5/main/postgresql.conf
Michael Lupo
  • 326
  • 3
  • 17