【问题标题】:Postgres find configuration files in linuxPostgres在linux中查找配置文件
【发布时间】:2017-12-13 10:24:08
【问题描述】:

我花了很多时间在 Linux 的不同发行版 以及 postgres 版本 本身!我很困惑……

【问题讨论】:

    标签: postgresql postgresql-9.1 postgresql-9.6 pg-hba.conf


    【解决方案1】:

    我终于找到了全局解决方案。

    首先你应该遵循以下步骤:

    1. su - postgres
    2. psql
    3. 对于 postgres 配置文件

      SHOW config_file;

    输出应该是这样的:

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

    对于 hba_file 使用:

    SHOW hba_file;
    

    【讨论】:

      【解决方案2】:

      如果你的实例没有启动并且你不能

      select current_setting('hba_file')
      

      select setting from pg_settings where name = 'hba_file'
      

      psql -c 'show hba_file'
      

      你可以找到他们:

      find / -name pg_hba.conf
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2023-03-23
        • 2012-10-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多