Tue Apr 10 06:33:58 PDT 2007
- Previous message: [Slony1-general] TABLE ADD KEY deprecation
- Next message: [Slony1-general] Database Schema Changes (DDL) not working on third node
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi again, I tried to create a new set, but I cannot but the table that is replicated between a->b into the b->c set. I get ERROR: duplicate key violates unique constraint "sl_table_tab_reloid_key". And as I read in : http://www.mail-archive.com/slony1-general@gborg.postgresql.org/msg02192.htm l it is not possible. Then how can I replicate the same table to more places??? My scenarion again. a.t1 -> b.t1 -> c.t1 a.t2 -> b.t2 Database a is fully replicated into b(tables t1 && t2). Database b is partially replicated into c(tables t1). 1. I make the cluster. 2. I create the set1 for a && b and add the tables to the set. 3. Create the paths 4. subscribe b to the set. 5. Start the replication scripts... It works. Then... 6. Create the c database/schema etc. 7. Create a new set. 8. Create the paths & listens 9. Add the table t1 to the set ->>>> ERROR: duplicate key violates unique constraint "sl_table_tab_reloid_key". And here it stops. Regards, Andy. > -----Original Message----- > From: Andrew Sullivan [mailto:ajs at crankycanuck.ca] > Sent: Friday, March 30, 2007 8:18 PM > To: Forum > Cc: 'Thomas Pundt'; slony1-general at lists.slony.info > Subject: Re: [Slony1-general] Database Schema Changes (DDL) > not working on third node > > 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 > >
- Previous message: [Slony1-general] TABLE ADD KEY deprecation
- Next message: [Slony1-general] Database Schema Changes (DDL) not working on third node
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list