Fri Jan 7 09:25:20 PST 2005
- Previous message: [Slony1-general] Move set
- Next message: [Slony1-general] Move set
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Jan 06, 2005 at 08:28:30AM -0500, Jan Wieck wrote:
> If your original config was
>
> node 1 = origin
> node 2 = subscribed with 1 as provider
> node 3 = subscribed with 1 as provider
>
> a bare "move set" to node 2 only changes this to
>
> node 1 = subscribed with 2 as provider
> node 2 = origin
> node 3 = subscribed with 1 as provider
>
> So you now have a cascaded setup. What you want to do is to change the
> data provider for node 3, which is not-so-intuitively done by issuing
> another
>
> subscribe set (id = 1, receiver = 3, provider = 2);
>
> Do not unsubscribe first, just use subscribe set to "change" the
> existing subscrption.
Yes, that works - but I have to restart node 3 for it to start replicating
again.
The only problem is that the slon process on the node that I move the set
away from quite often exits with the following message:
FATAL localListenThread: MOVE_SET but no provider found for set 1
The slonik code I use for the switchover is:
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);
}
on success
{
echo 'Set 1 successfully moved from 1 to 2';
}
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 I use Slony-I 1.0.5 on PostgreSQL 7.4.6
---
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