Fri Jan 7 13:18:40 PST 2005
- Previous message: [Slony1-general] Move set
- Next message: [Slony1-general] Move set
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
--
David Darville
- Previous message: [Slony1-general] Move set
- Next message: [Slony1-general] Move set
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list