2017-07-25 32 views
0

我想配置PostgreSQL 9.4与BDR,我有两个服务器,其中主人的地址169.254.9.90和奴隶的地址169.254.12.48。我已经可配置的高手,但是当我尝试加入的奴隶,我得到一个错误的复制:Postgresql 9.4和BDR SELECT bdr.bdr_group_join错误

命令加入:

SELECT bdr.bdr_group_join(
    local_node_name := 'node2', 
    node_external_dsn := 'host=169.254.12.48 port=5432 user=postgres dbname=amstest password=postgres', 
    join_using_dsn := 'host=169.254.9.90 port=5432 user=postgres dbname=amstest password=postgres' 
); 

即时得到的错误是:

ERROR: connection from remote back to local in replication mode failed DETAIL: remote reported: ERROR: establish BDR: FATAL: no pg_hba.conf entry for replication connection from host "169.254.9.90", user "postgres", SSL on FATAL: no pg_hba.conf entry for replication connection from host "169.254.9.90", user "postgres", SSL off

DETAIL: Connection string is 'replication=database fallback_application_name='BDR test connection' connect_timeout=30 keepalives=1 keepalives_idle=20 keepalives_interval=20 keepalives_count=5 host=169.254.12.48 port=5432 user=postgres dbname=amstest password=postgres'

CONTEXT: SQL statement "SELECT *
FROM bdr.bdr_test_remote_connectback(join_using_dsn, node_external_dsn)" PL/pgSQL function bdr_group_join(text,text,text,text,integer,text[]) line 39 at SQL statement

任何人都可以帮助我吗?

回答

0

FATAL: no pg_hba.conf entry for replication connection from host "169.254.9.90", user "postgres"

每个节点必须能够连接到每个其他节点,用于复制和非复制连接。

新加入的节点没有pg_hba.conf,允许您指定的现有节点作为连接目标连接到它。