Andrew Sullivan ajs at crankycanuck.ca
Fri Mar 30 10:17:58 PDT 2007
Ah.  That won't work.  What you need is to break the b->c tables into
a separate set, and then subscribe c only to that set, using b as
the provider.

A

On Fri, Mar 30, 2007 at 06:08:24PM +0300, Forum wrote:
> In the real scenarion:
> 
> DB a is fully replicated into b. 
> 
> And some tables from b are replicated into c. 
> 
> 
> Here is the place that fails.... 
> 
> I think I am making a confusion about how to configure this.
> 
> Should I do only a new set for the second replication (b->c)??
> 
> Andy. 
> 
> > -----Original Message-----
> > From: Thomas Pundt [mailto:mlists at rp-online.de] 
> > Sent: Friday, March 30, 2007 4:25 PM
> > To: slony1-general at lists.slony.info; Forum
> > Subject: Re: [Slony1-general] Database Schema Changes (DDL) 
> > not working on third node
> > 
> > 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/ ----
> > 
> > 
> 
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general

-- 
Andrew Sullivan  | ajs at crankycanuck.ca
"The year's penultimate month" is not in truth a good way of saying
November.
		--H.W. Fowler


More information about the Slony1-general mailing list