Hi Steve,<div><br></div><div>Below is the scenario I want to achieve.</div><div><br></div><div><br></div><div>                      Warm-Standby</div><div>Master  ------------------------------------------------ DR-Master</div>
<div>    |</div><div>    |    Replication built on  Slony 2.1.</div><div>    |</div><div>   V</div><div>Slave <br clear="all"><div><br></div><div>Given is actually setup of production, master/slave replication with log archive shipping using slony 2.1. And, Master with DR setup on same data center as DR-Master with Warm Standby configuration running fine with minimal lag.</div>
<div><br></div><div>Q: What I want to achieve ?</div><div>A:  Swap the Masters. Means, now slave should receive events from DR-Master once it get promoted to Master as shown below</div><div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px">
<blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px"><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div>Master   DR Master</div>
</div></div></blockquote></blockquote><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px"><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px">
<div><div><div>    |            |</div><div>   X           |    Replication built on  Slony 2.1.</div></div></div></blockquote></blockquote><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px">
<blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div>    |            |</div></div></div></blockquote></blockquote><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px">
<blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div>   V            |</div></div></div></blockquote></blockquote><blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px">
<blockquote class="webkit-indent-blockquote" style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div>Slave &lt;------|</div></div></div></blockquote></blockquote></blockquote><div><div><br></div><div>I believed, the DR-Master will have the same _slonyschema except the primary hostname. So, I have changed on both DR-Master &amp; Slave of sl_path of primary hostname as fix.</div>
<div>Assuming that, I have tested on my local box with below steps.</div><div><br></div><div>1. Stop slony between master,slave.</div><div>2. Take the _slonyschema dump of Master (In case any problem).</div><div>3. Promote the DR-Master.</div>
<div>4. update the _slonyschem.sl_path of column pa_conninfo with primary hostname on DR-Master &amp; Slave.</div><div>5. Start slony daemons on DR-Master &amp; Slave.</div><div><br></div><div>Above steps won&#39;t work all the time, I did many times, very few times I could able to send events from DR-master to Slave with proper numbering of .SQL files.(log archives).</div>
<div>I would request to recommend the correct procedure for swapping providers.</div><div><br></div>-- <br>Regards<div>Raghav</div><div>Blog: htt://<a href="http://raghavt.blogspot.com/" target="_blank">raghavt.blogspot.com/</a></div>
<br>
</div>