I was trying to install postgresql by this tutorial http://powa.readthedocs.io/en/latest/quickstart.html to use the tool for bd Powa.

I am use S.O. debian 8 Jessie.

I ran:

 apt-get install postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6
 apt-get install postgresql-9.6-powa

So far so good, the DBMS has gone up and I can create tables etc.

But I'm not finding where the postgresql.conf file is. I tried searching using locate postgresql.conf, but can not find, I suspect it was not created. I need to add some libraries in the parameter: shared_preload_libraries

Has anyone installed postgresql in this way, and could it tell you where the postgresql.conf file might be, or another one to configure the shared_preload_libraries parameter?

  • find /etc/postgresql -type f 2>/dev/null | grep conf
    – Philᵀᴹ
    Nov 3, 2017 at 11:55
  • Apparently there is a tool in Debian to show you where the data directory is: pg_lsclusters
    – user1822
    Nov 3, 2017 at 11:58
  • ps -aux | grep -i 'postgres.*config' also could to help.
    – Abelisto
    Nov 3, 2017 at 17:07

2 Answers 2


If you wish to know under which settings PostgreSQL is currently running, one good way to do it is to have a look at the pg_settings view:

SELECT name, setting, context
FROM pg_settings
WHERE name LIKE '%conf%';

I've added the context column to know how new values will be taken into account (a server restart, a config reload, ...).

You could also use the SHOW command:

SHOW config_file;

Whatever your OS is, you always can use the psql utility, DBeaver or any other client tool, to type the SQL show command to see the value of any run-time setting.

For example, on my BigSur OSX system, where I have installed PostgreSQL v13 with the EDB installer, these are the locations for postgresql.conf and pg_hba.conf files using psql utility, sudden as the postgres user:

psql -U postgres -c 'show config_file'
Password for user postgres: 
(1 row)
psql -U postgres -c 'show hba_file'
Password for user postgres: 
(1 row)

Your Answer

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

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