Tim Bowden tim.bowden at westnet.com.au
Sun Sep 9 07:56:08 PDT 2007
On Sun, 2007-09-09 at 11:49 +0100, Filip Rembiałkowski wrote:
> 2007/9/9, Tim Bowden <tim.bowden at westnet.com.au>:
> > I'm looking at using slony for the first time.  I'd like to know if it's
> > possible to have different tables in a slave db replicated from
> > different master db's.
> Yes.
> 

Great.  That's confirmed my understanding.

> > Just to outline the setup I'm looking at, I have (proposed) master db's
> > that are distributed in various geographical areas for performance
> > reasons that need to be replicated back to a central slave.  The
> > critical table in each master db (the only table needing to be
> > replicated) would have an identical data structure and RI model (except
> > for a constraint limiting the pk to that properly belonging to that
> > particular master db).
> >
> > If possible the slave tables would actually be partitions of a "whole of
> > system" slave db (ie, children in a table inheritance relationship) in
> > order to provide a view of all the data in one slave table,
> Yes :) That's a neat idea and should be doable.

Oh good, things are looking up.  Hopefully that will scale well as I've
got 100+ master db's.  Hmmm, I'm going to have to be careful with time
syncing all hosts and db/system management is going to be a job and a
half...

> Slony has a concept of replication sets, and you can have different
> set for each partition, as long as they have same structure.
> Try to get more familiar with slony1 and it will be clear to you.
> 
> I recommend http://slony.info/documentation/, begin from
> http://slony.info/documentation/concepts.html
> 

Ok, back to reading for me, and time to build up a test scenario to help
develop my understanding.

> >  though from
> > a first reading of the docs I suspect this is not possible as the table
> > schemas would be different from master to slave.
> 
> i don't get it, first you said that tables have identical structure,
> and now you say table schemas are different.
> 

*sigh*  That's just me being clear as mud as usual.  _I_ knew what I
meant, even if no one else did!  What I meant was the slave tables are
defined as inherited tables, while the masters are not, though they
share the same field structures.  It seems from what you are saying that
this is ok, and not a problem as I suspected.

> For the setup you described  to work, it's enough that they have same
> columns and that you have PK unique across whole set of partitions,
> but this should be easy.

Easy?  That's what I like to hear!

Thanks,
Tim Bowden



More information about the Slony1-general mailing list