Issues setting up BDR with multiple databases

From: Jorge Torralba <jorge(dot)torralba(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Issues setting up BDR with multiple databases
Date: 2015-06-19 00:09:58
Message-ID: CACut7uQOmB7dG7P3GhCa6U7BfnrOXi5qHRrWK6O0t-wJ74OPjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On NODE 1

create database christian;

create user christian with password 'christian';

alter database christian owner to christian;

create database lizzie;

create user lizzie with password 'lizzie';

alter database lizzie owner to lizzie;

create database jorge;

create user jorge with password 'jorge';

alter database lizzie owner to jorge;

\c christian;

create extension btree_gist;

create extension bdr;

select bdr.bdr_group_create ( local_node_name := 'dbadevpgha03',
node_external_dsn := 'host=10.5.101.176 port=5432 dbname=christian' );

SELECT bdr.bdr_node_join_wait_for_ready();

select * from bdr.bdr_nodes;

\c lizzie;

create extension btree_gist;

create extension bdr;

select bdr.bdr_group_create ( local_node_name := 'dbadevpgha03',
node_external_dsn := 'host=10.5.101.176 port=5432 dbname=lizzie' );

SELECT bdr.bdr_node_join_wait_for_ready();

select * from bdr.bdr_nodes;

\c jorge;

create extension btree_gist;

create extension bdr;

select bdr.bdr_group_create ( local_node_name := 'dbadevpgha03',
node_external_dsn := 'host=10.5.101.176 port=5432 dbname=jorge' );

SELECT bdr.bdr_node_join_wait_for_ready();

select * from bdr.bdr_nodes;

On NODE 2

-bash-4.1$ bdr_init_copy -D /var/lib/pgsql/9.4-bdr/data -n dbadevpgha04 -d
"host=10.5.101.176 dbname=jorge port=5432"
--local-dbname="host=10.5.101.179 dbname=jorge"

bdr_init_copy: starting ...

Getting remote server identification ...

Detected 3 BDR database(s) on remote server

Updating BDR configuration on the remote node:

christian: validating BDR configuration ...

christian: creating replication slot ...

christian: creating node entry for local node ...

jorge: validating BDR configuration ...

jorge: creating replication slot ...

jorge: creating node entry for local node ...

lizzie: validating BDR configuration ...

lizzie: creating replication slot ...

lizzie: creating node entry for local node ...

Creating base backup of the remote node...

52504/52504 kB (100%), 1/1 tablespace

Creating restore point on remote node ...

Bringing local node to the restore point ...

Transaction log reset

Initializing BDR on the local node:

christian: adding the database to BDR cluster ...

Could not add local node to cluster, status PGRES_FATAL_ERROR: ERROR: node
identity for local dsn does not match current node

DETAIL: The dsn 'dbname=jorge host=10.5.101.179' connects to a node with
identity (6161869759719318325,2,16389) but the local node is
(6161869759719318325,2,16385)

HINT: The node_local_dsn (or, for bdr, dsn if node_local_dsn is null)
parameter must refer to the node you're running this function from

CONTEXT: SQL statement "SELECT bdr.internal_begin_join(

'bdr_group_join',

local_node_name,

CASE WHEN node_local_dsn IS NULL THEN node_external_dsn ELSE
node_local_dsn END,

join_using_dsn)"

PL/pgSQL function bdr_group_join(text,text,text,text,integer,text[]) line
21 at PERFORM

Thanks for looking.

--
Thanks,

Jorge Torralba
----------------------------

Note: This communication may contain privileged or other confidential
information. If you are not the intended recipient, please do not print,
copy, retransmit, disseminate or otherwise use the information. Please
indicate to the sender that you have received this email in error and
delete the copy you received. Thank You.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2015-06-19 00:13:54 Re: Test for char errors
Previous Message 夏高 2015-06-18 23:29:19 Re: Test for char errors