Postgres find configuration files in linux

荒凉一梦 提交于 2019-12-01 09:37:35

Finally I found the global solution for it.

First you should follow these steps:

  1. su - postgres
  2. psql
  3. For postgres configuration file:

    SHOW config_file;

the output should be like this:

postgres=# SHOW config_file;
                   config_file
    ------------------------------------------
     /etc/postgresql/9.6/main/postgresql.conf
    (1 row)

and for hba_file use:

SHOW hba_file;

If you instance is not started and you can't

select current_setting('hba_file')

or

select setting from pg_settings where name = 'hba_file'

or

psql -c 'show hba_file'

you can just find them:

find / -name pg_hba.conf
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!