Wed Feb 22 10:35:06 PST 2012
- Previous message: [Slony1-general] Replication based on content
- Next message: [Slony1-general] [bug] config variable "quit_sync_finalsync" missing in slony 2.1.0 ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 2012-02-22 13:05, Ger Timmens wrote: > Hi, > > We are currently using slony 2.1.1/postgresql 9.1.2. > > We were wondering if it will be possible in future versions of slony to > replicate > depending on the contents of some fields in a table record. > So in our current implemenation we have > > table SomeTable ( name varchar, ......); > > on the master. This table is succesfully replicated to several slaves > (slave1, slave2, ......). > > What we would like is depending on the value of 'name', replicate the > record, > to e.g. > > slave1 if (name like 'a%'), > slave2 if (name like 'b%), > > etc... > > Are there any thoughts for slony being capable of doing this ? > How can we help developing this ? Are there other replication solutions > that are capable of doing this ? > Some time ago I had to implement such thing. I did it by - on Master and SlaveA, create "shadow table" SomeTablePartA , identical to SomeTable but holding only its well-defined subset. - on Master, create triggers on SomeTable, to maintain the subset in SomeTablePartA - add SomeTablePartA to replication set - so it is replicated like any other table to SlaveA - on SlaveA database, create a trigger on SomeTablePartA (trigger active on slave - must be added to Slony config), which populated changes back to SomeTable on SlaveA.
- Previous message: [Slony1-general] Replication based on content
- Next message: [Slony1-general] [bug] config variable "quit_sync_finalsync" missing in slony 2.1.0 ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list