Forum frum at ar-sd.net
Tue Apr 10 23:23:10 PDT 2007
Thank you for all your answers, 

Now I think I'm starting to understand now how && why. 


My first mistake was that I made 2 clusters. 
The second error came from that I created 2 sets and I wanted to put the
same table in the different sets. (which was not possible)

If I create different sets it works well. 

I really missuderstood how slony makes the things work. 

Thanks again. 

Andy. 

 

> -----Original Message-----
> From: Andrew Hammond [mailto:andrew.george.hammond at gmail.com] 
> Sent: Wednesday, April 11, 2007 12:36 AM
> To: Forum
> Cc: Andrew Sullivan; Thomas Pundt; slony1-general at lists.slony.info
> Subject: Re: [Slony1-general] Database Schema Changes (DDL) 
> not working on third node
> 
> On 4/10/07, Forum <frum at ar-sd.net> wrote:
> >
> > 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/msg021
> > 92.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".
> 
> A table (or sequence, for that matter) can only be in one set 
> at a time. A set can either be subscribed to a node or not 
> subscribed to a node. If you wish to have different 
> replication rules for different objects, then you must put 
> them in different sets.
> 
> So, create set1 for table1 and set2 for table2. Subscribe 
> node2 to both set1 and set2. Then subscribe node3 to only 
> set1. This should address your need.
> 
> Andrew
> 
> P.S. This is all with the caveat that you're only 
> initializing a single replication cluster in the database. I 
> don't know what would happen if you had multiple clusters, 
> and I strongly doubt it's a direction you will want to pursue.
> 
> 



More information about the Slony1-general mailing list