Thomas Pundt mlists at rp-online.de
Fri Mar 30 06:24:49 PDT 2007
Hi,

On Friday 30 March 2007 15:02, Forum wrote:
| I do the schema change with "execute script()", maybe I have something
| misconfigured.

looks suspiciously as if, yes.

| I tried with this example:
|
| REPLICATION 1: DB a to DB b
|
| cluster name=replic_loco1;
| NODE 1 ADMIN CONNINFO = 'dbname=a host=127.0.0.1 user=slony port=5432';
| NODE 2 ADMIN CONNINFO = 'dbname=b host=127.0.0.1 user=slony port=5432';
|
| init cluster (id=1, comment='replic_loco Master Node'); 
| store node (id=2, comment='replic_loco Subscriber Node 1');
|
| STORE PATH (SERVER=1, CLIENT=2, CONNINFO='dbname=a host=127.0.0.1 user=slony 
port=5432'); 
| STORE PATH (SERVER=2, CLIENT=1, CONNINFO='dbname=b host=127.0.0.1 user=slony 
port=5432');
|
| create set (id=11, origin=1, comment='replic_loco Tables and Sequences');
| set add table (id=1, set id=11, origin=1, fully qualified name='public.t1',
| comment='replic_loco table public.t1');
|
| subscribe set (id=11, provider=1, receiver=2, forward=yes);
|
| And replication 2: DB b to DB c
|
| cluster name=replic_loco2;
| NODE 1 ADMIN CONNINFO = 'dbname=b host=127.0.0.1 user=slony port=5432';
| NODE 2 ADMIN CONNINFO = 'dbname=c host=127.0.0.1 user=slony port=5432';
|
| init cluster (id=1, comment='replic_loco Master Node'); 
| store node (id=2, comment='replic_loco Subscriber Node 1');
|
| STORE PATH (SERVER=1, CLIENT=2, CONNINFO='dbname=b host=127.0.0.1 user=slony 
port=5432'); 
| STORE PATH (SERVER=2, CLIENT=1, CONNINFO='dbname=c host=127.0.0.1 user=slony 
port=5432');
|
| create set (id=21, origin=1, comment='replic_loco Tables and Sequences');
| set add table (id=1, set id=21, origin=1, fully qualified name='public.t1',
| comment='replic_loco table public.t1');
|
| subscribe set (id=21, provider=1, receiver=2, forward=yes);

you mean, you have created two clusters for replication that replicate the
same tables? IIRC that won't work.

If all you want is replicating a number of tables to two (slave) nodes, then
you need to create these nodes _in the same cluster_. Simply use something 
like

  store node (id = 3, comment = 'Node 3');

to add a new node to your existing cluster and 

  store path (server=1, client=3, conninfo=...);
  store path (server=3, client=1, conninfo=...);

to store the communication paths. A

  subscribe set (id=1, provider=1, receiver=3, forward=yes);

would start replicating your set to the new node.

Ciao,
Thomas

-- 
Thomas Pundt <thomas.pundt at rp-online.de> ---- http://rp-online.de/ ----


More information about the Slony1-general mailing list