错误:建立BDR:致命:没有pg_hba.conf条目用于从主机“[local]”,用户“postgres”进行复制连接

时间:2016-12-26 12:25:54

标签: postgresql replication postgresql-bdr

当两个节点都在不同的主机上时,我尝试设置BDR时会出现以下错误。

SELECT bdr.bdr_group_join(local_node_name := 'node2',node_external_dsn := 'port=5599 dbname=bdrdemo host=<ip of node2> user=postgres', join_using_dsn := 'port=5432 dbname=bdrdemo host=<ip of node1> user=postgres'); 

ERROR:  establish BDR: FATAL:  no pg_hba.conf entry for replication connection from host "[local]", user "postgres"

两个主机都有一个pg_hba.conf,如:

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     postgres                                trust
host    replication     postgres        127.0.0.1/32            trust
host    replication     postgres        ::1/128                 trust
host    all             all              0.0.0.0/0               trust
host    all             all              ::/0                    trust
host    replication     postgres        0.0.0.0/0               trust
host    replication     postgres        ::/0                    trust

对postgresql.conf的更改

listen_adresses = '*' 
shared_preload_libraries = 'bdr'
wal_level = 'logical'
track_commit_timestamp = on
max_connections = 100
max_wal_senders = 10
max_replication_slots = 10
max_worker_processes = 10

这里出了什么问题?

0 个答案:

没有答案