<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Q: What I want to achieve ?<br>
A:  Swap the Masters. Means, now slave should receive events from<br>
DR-Master once it get promoted to Master as shown below<br>
</blockquote>
<br></div>
Have you read &#39;Controlled Switchover&#39; <a href="http://www.slony.info/documentation/2.1/failover.html" target="_blank">http://www.slony.info/<u></u>documentation/2.1/failover.<u></u>html</a><br>
<br>
I think the MOVE SET command is what you want.<br>
<br>
You setup &#39;DR Master&#39; as a subscriber to your sets just like &#39;slave&#39; was.  You then MOVE SET to make &#39;DR Master&#39; the new origin.  &#39;slave&#39; will receive updates from &#39;DR Master&#39; instead of &#39;Master&#39; , assuming you have a complete path network in place.<br>

<br></blockquote><div>Thank you Steve. Make sense to me.</div><div><br></div><div>Sorry to say, my question was how to avoid resubscribing DR-Master to slave and then promoting it to master. Since, complete information of master is available on dr-master.</div>
<div><br></div><div>Due to my curiosity level :)  I tested again with different approach. Since, DR Master is Streaming replication READ-ONLY server it will have same _slonyschema of all what&#39;s there on Master, just the connection string changes needed. So, I thought changing the connection string should fix.</div>
<div><br></div><div>I read this part of documentation and implemented below steps not for once, couple of times, this time it never failed.</div><div><a href="http://slony.info/documentation/2.1/stmtstorepath.html">http://slony.info/documentation/2.1/stmtstorepath.html</a></div>
<div><br></div><div>1. Stop slon on Master/Slave</div><div>2. change store paths with function on DR-master.</div><div><div>aquent_cdb=# select _myrep.storepath(1,2,&#39;host=<b><a href="http://dr-master.com">dr-master.com</a></b> dbname=master user=postgres port=5432&#39;,10);   ///Note: previsouly it was from <a href="http://master.com">master.com</a></div>
<div> storepath</div><div>------------</div><div> 5000000017</div><div>(1 row)</div></div><div>4. Repeat the step 3 on slave to change the provider info.</div><div>5. Start slon on DR-Master/slave.</div><div><br></div><div>
Above steps, went fine and all write operations on dr-master(newly promoted as master) started publishing on slave. </div><div>Correct me if this approach is doable. </div><div><br></div><div>--Raghav</div></div>