Re: [RFC][PATCH] Logical Replication/BDR prototype and architecture

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC][PATCH] Logical Replication/BDR prototype and architecture
Date: 2012-06-13 17:52:40
Message-ID: 201206131952.41007.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

The patch as of yet doesn't contain how you actually can use the prototype...
Obviously at this point its not very convenient:

I have two config files:
Node 1:
port = 5501
wal_level = logical
max_wal_senders = 10
wal_keep_segments = 200
multimaster_conninfo = 'port=5502 host=/tmp'
multimaster_node_id = 1

Node 2:
port = 5502
wal_level = logical
max_wal_senders = 10
wal_keep_segments = 200
multimaster_conninfo = 'port=5501 host=/tmp'
multimaster_node_id = 2

after initdb'ing the first cluster (initdb required):
$ ~/src/postgresql/build/assert/src/backend/postgres -D
~/tmp/postgres/bdr/1/datadir/ -c
config_file=~/tmp/postgres/bdr/1/postgresql.conf -c
hba_file=~/tmp/postgres/bdr/1/pg_hba.conf -c
ident_file=~/tmp/postgres/bdr/1/pg_ident.conf

$ psql -p 5501 -U andres postgres
CREATE TABLE data(id serial primary key, data bigint);
ALTER SEQUENCE data_id_seq INCREMENT 2;
SELECT setval('data_id_seq', 1);

shutdown cluster

$ rsync -raxv --delete /home/andres/tmp/postgres/bdr/1/datadir/*
/home/andres/tmp/postgres/bdr/2/datadir

start both cluster which should sync after some output.

$ psql -p 5501 -U andres postgres
SELECT setval('data_id_seq', 2);

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2012-06-13 18:01:42 Re: [RFC][PATCH] BDR Prototype startup instructions (not prematurely sent this time)
Previous Message Andres Freund 2012-06-13 17:27:49 Re: [PATCH 10/16] Introduce the concept that wal has a 'origin' node