Fri Jan 7 15:42:55 PST 2005
- Previous message: [Slony1-general] Move set
- Next message: [Slony1-general] getting schema dump for adding a new client
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
David Darville <david at darville.name> writes: > On Wed, Jan 05, 2005 at 01:03:17PM +0000, David Darville wrote: > >> But when moving origin of the set from node 1 to node 2, I end up with >> having node 1 forward all changes to node 3. And what I really need is a way >> to take down node 1 for maintenance, and that I cannot do while it forwards >> to node 3. >> I can only see 2 ways to change that - either I can unsubscribe node 3 and >> subscribe it with node 2 as provider, but that locks down node 3 for quite a >> while, or I could do a failover instead, and risk loosing some data. > > I have now found a 3rd solution, using the following script to move the > origin of the set from node 1 to node 2: > > echo 'Locking set 1 on node 1'; > lock set (id = 1, origin = 1); > wait for event ( origin = 1, confirmed = 2 ); > > try > { > echo 'Trying to mode set 1 from 1 to 2'; > move set (id = 1, old origin = 1, new origin = 2); > } > on error > { > echo 'ERROR - unlocking set 1 on node 1'; > unlock set (id = 1, origin = 1); > } > > echo 'Changing subscription of node 3 to 2'; > subscribe set ( id = 1, provider = 2, receiver = 3, forward = yes ); > wait for event ( origin = 3, CONFIRMED = 2 ); > > echo 'Restarting node 3'; > restart node 3; > > > And it looks like it is working, but I am not certain if this is can > cause problems or not, especially since I have to restart node 3 > after resubscribingit. Could someone with a deeper understanding of > Slony-I please comment on this. I'm not sure what problems you're anticipating here. I'm a little surprised that you needed to do anything particularly to node 3 after pointing its subscription to node 2. The thing you should check for is that there is an sl_listen entry that allows node #3 to get events from node #2 directly from node #2. I recently ran into a "situation" where, absent of that, and in the presence of node 3 looking for node 2 events on node 1, the "resubscribe" didn't take effect because it wasn't getting updates directly enough fron node #2. If what you're wondering is "Should I use SUBSCRIBE SET to repoint node 3 to node 2?", then the answer is "absolutely yes, that's the right thing to do." -- "cbbrowne","@","ca.afilias.info" <http://dev6.int.libertyrms.com/> Christopher Browne (416) 673-4124 (land)
- Previous message: [Slony1-general] Move set
- Next message: [Slony1-general] getting schema dump for adding a new client
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list