<div dir="ltr">Jan,<div><br></div><div>But as you said they all have to be in the same cluster, correct ?</div></div><div class="gmail_extra"><br clear="all"><div>Dave Cramer</div>
<br><div class="gmail_quote">On 9 October 2014 18:31, Jan Wieck <span dir="ltr"><<a href="mailto:jan@wi3ck.info" target="_blank">jan@wi3ck.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 10/09/2014 05:26 PM, Glyn Astill wrote:<br>
>> From: Granthana Biswas <<a href="mailto:granthana.biswas@gmail.com">granthana.biswas@gmail.com</a>><br>
>>To: Glyn Astill <<a href="mailto:glynastill@yahoo.co.uk">glynastill@yahoo.co.uk</a>><br>
>>Sent: Thursday, 9 October 2014, 16:34<br>
>>Subject: Re: [Slony1-general] Error with Slony replication from another slony cluster slave<br>
>><br>
>><br>
>><br>
>>Hi Glyn,<br>
>><br>
>><br>
>>In my case I have two clusters:<br>
>><br>
>><br>
>>Cluster1 -> replicating from DB1 -> DB2<br>
>>Cluster2 -> replicating from DB1 -> DB3<br>
>><br>
>><br>
>>Can I stop Cluster2 and add DB3 to Cluster1 with DB2 as its master? Or do I have to delete the data first in DB3?<br>
>><br>
>><br>
><br>
> You'll want to run DROP NODE against each node in Cluster2, (or if on 2.0+ you can get away with just DROP SCHEMA _Cluster2 CASCADE) and stop the slons for Cluster2.<br>
<br>
<br>
Cascading, forwarding and all that is one of the core concepts of Slony.<br>
If you create one single setup looking like this:<br>
<br>
DB1 -> DB2 -> DB3<br>
<br>
then you have a lot more flexibility and functionality than is obvious<br>
at first. Aside from being able to fail over to DB2.<br>
<br>
Slony will let you "MOVE" the master role from DB1 to DB2. That<br>
operation will not just make DB2 the master, but at the same time DB1<br>
becomes a replica that doesn't need an initial sync, so your setup now<br>
would look like this:<br>
<br>
DB1 <- DB2 -> DB3<br>
<br>
This is useful if you need to perform some maintenance on DB1. At this<br>
point DB2 is your master an you would just stop the slon process for<br>
DB1, do whatever you need to do, and start the slon process again. Once<br>
DB1 has caught up, you just transfer the master role back and everything<br>
is as it was.<br>
<br>
What also works is that if you need to perform maintenance on DB2, it<br>
doesn't mean that DB3 has to fall behind too. You can easily change the<br>
data provider for DB3 to be DB1, so your configuration changes to<br>
<br>
DB1 -> DB2<br>
|<br>
V<br>
DB3<br>
<br>
At this point you stop the slon process for DB2, perform what you need<br>
to do on DB2, start the slon process and after DB2 has caught up, make<br>
it the data provider for DB3 again.<br>
<br>
<br>
Regards,<br>
Jan<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Jan Wieck<br>
Senior Software Engineer<br>
<a href="http://slony.info" target="_blank">http://slony.info</a><br>
_______________________________________________<br>
Slony1-general mailing list<br>
<a href="mailto:Slony1-general@lists.slony.info">Slony1-general@lists.slony.info</a><br>
<a href="http://lists.slony.info/mailman/listinfo/slony1-general" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-general</a><br>
</font></span></blockquote></div><br></div>