I get this below error while trying to set up BDR when both the nodes are on different hosts.

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"

Both the hosts have a pg_hba.conf like:

# "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

Changes to 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

What has gone wrong here?

0

There are 0 answers