Hello,
I am trying to setup table level replication with BDR 0.9.0 but I am running into some errors. I believe I must be missing a step or two in the process.
I currently have a two node group that I want to build.
1) On node1 I have a database built with the tables I want to replicate; table1, table2, table3.
2) On node2 I have created the database to hold the tables (just issued a create database statement) but no other objects have been added on node2.
3) On node1 I have issued the following commands without error:
SELECT bdr.bdr_group_create(
local_node_name := 'node1',
node_external_dsn := 'port=5432 dbname=apimgtdb user=postgres password=XXXX host=10.0.0.0.101',
replication_sets := ARRAY['test_rep_set']
);
SELECT bdr.bdr_node_join_wait_for_ready();
4) On node2 I then issue the following to join the group with out error:
SELECT bdr.bdr_group_join(
local_node_name := 'node2',
node_external_dsn := 'port=5432 dbname=apimgtdb user=postgres password=XXXX host=10.0.0.102',
join_using_dsn:= 'port=5432 dbname=apimgtdb user=postgres password=PostAlign host=10.0.0.101',
replication_sets := ARRAY[’test_rep_set']
);
5) On node2, if I then issue;
SELECT bdr.bdr_node_join_wait_for_ready();
the command just hangs. So I killed the command
6) Back on node1, I issue the command and receive an error:
select bdr.table_set_replication_sets(’table1', ARRAY[’test_rep_set'])
;
ERROR: No peer nodes or peer node count unknown, cannot acquire DDL lock
HINT: BDR is probably still starting up, wait a while
CONTEXT: SQL statement "SECURITY LABEL FOR bdr ON TABLE table1 IS '{ "sets" : [“test_rep_set"] }'"
PL/pgSQL function bdr.table_set_replication_sets(regclass,text[]) line 30 at EXECUTE statement
What am I missing? How are the steps different from setting database replication?
Thanks