【发布时间】:2017-12-13 10:24:08
【问题描述】:
我花了很多时间在 Linux 的不同发行版 以及 postgres 版本 本身!我很困惑……
【问题讨论】:
标签: postgresql postgresql-9.1 postgresql-9.6 pg-hba.conf
我花了很多时间在 Linux 的不同发行版 以及 postgres 版本 本身!我很困惑……
【问题讨论】:
标签: postgresql postgresql-9.1 postgresql-9.6 pg-hba.conf
我终于找到了全局解决方案。
首先你应该遵循以下步骤:
su - postgrespsql对于 postgres 配置文件:
SHOW config_file;
输出应该是这样的:
postgres=# SHOW config_file;
config_file
------------------------------------------
/etc/postgresql/9.6/main/postgresql.conf
(1 row)
对于 hba_file 使用:
SHOW hba_file;
【讨论】:
如果你的实例没有启动并且你不能
select current_setting('hba_file')
或
select setting from pg_settings where name = 'hba_file'
或
psql -c 'show hba_file'
你可以找到他们:
find / -name pg_hba.conf
【讨论】: