2

当两个节点都在不同的主机上时,尝试设置 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

这里出了什么问题?

4

0 回答 0