1

Where are the configuration files located for PostgreSQL 11 on Ubuntu, specifically 16.04?

Postgres Ubuntu packages normally store their configs in /etc/postgresql/<version>/main. However, I just purged all postgresql packages, and then install Postgresql 11 vai sudo apt install postgresql-11.

Now, the folder /etc/postgresql exists, but it's completely empty. Normally the default package install populates the subdirectories with defaults, but there's nothing there. I tried manually populating them and then restarting the server, but I can't connect even thought sudo service postgresql status says the server's running?

Did the location of the config files change in PG11? I can't find any mention of this in the release docs. Where are the new config files located on Ubuntu?

0

Even though I ran sudo apt-get purge postgresql*, this apparently left the /var/lib/postgresql/* directories for previous versions unchanged, and it seems something in there was preventing the new install from initializing the files for version 11.

I fixed this by again purging everything but then also manually deleting /var/lib/postgresql. I then re-installed the postgresql-11 package and everything worked fine.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.