0

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 '17 at 11:55
  • Apparently there is a tool in Debian to show you where the data directory is: pg_lsclusters – a_horse_with_no_name Nov 3 '17 at 11:58
  • ps -aux | grep -i 'postgres.*config' also could to help. – Abelisto Nov 3 '17 at 17:07
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;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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