Fri Sep 5 14:47:28 PDT 2008
- Previous message: [Slony1-general] Best way to switch to a fresh new master?
- Next message: [Slony1-general] Tables related via foreign key grouped in different sets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Sep 3, 2008 at 9:11 AM, David Lee Lambert <dlambert at bmtcarhaul.com>wrote: > On Wednesday 03 September 2008 11:29:10 am Vivek Khera wrote: > > On Wed, Sep 3, 2008 at 11:19 AM, David Lee Lambert > > > > <dlambert at bmtcarhaul.com>wrote: > > > Let's say I have three servers, X, Y and P. X and Y are "test" > > > instances, P > > > is "production" (or closer to it). X and Y have Slony installed, P h= as > > > not been used for Slony before. Can I install Slony on P and use the > > > same set definition to start replicating to Y from P? Or do I need to > > > create a new set, even though the table-names would be the same? > > > > > > What's a good sequence of commands to do this? > > > > Yes, you can do this. Something along these lines: > > > > First, create the DB and load an empty schema identical to the origin's > > schema. > > Thanks, but I'm not sure we're talking about the same problem. > > X, Y and P have exactly the same schema already. > > X has stale test data. Y has an up-to-date exact replica of the stale te= st > data. > > P has production data. I want Y to have an up-to-date exact replica of t= he > production data. > > In the language of slon_tools.conf, my current configuration is > > add_node(node =3D> 5, host =3D> 'x.example.com', dbname=3D> 'data' ); > add_node(node =3D> 6, host =3D> 'y.example.com', dbname=3D> 'data' ); > $MASTERNODE =3D 5; > $SLONY_SETS =3D { 'set1' =3D> { "origin" =3D> 5 ... } } > > and I want > > add_node(node =3D> 1, host =3D> 'p.example.com', dbname=3D>'data' ); > add_node(node =3D> 6, host =3D> 'y.example.com', dbname=3D>'data' ); > $MASTERNODE =3D 1; > $SLONY_SETS =3D { 'set1' =3D> { "origin" =3D> 1 ... } }; > > I know I can do > > dropdb -h y.example.com data > > and reinstall the schema and Slony; but is there a faster way? Not really. The brief version is that you have some snapshots that you want to promote to being subscribers. Slony can't do that (yet). I don't know how you'd do that in any way that was significantly more efficient than simply loading the data afresh, but if you have some ideas and want to write some code... :) Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.slony.info/pipermail/slony1-general/attachments/20080905/= 38aef032/attachment.htm
- Previous message: [Slony1-general] Best way to switch to a fresh new master?
- Next message: [Slony1-general] Tables related via foreign key grouped in different sets
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list