>
>
>> Q: What I want to achieve ?
>> A:  Swap the Masters. Means, now slave should receive events from
>> DR-Master once it get promoted to Master as shown below
>>
>
> Have you read 'Controlled Switchover' http://www.slony.info/**
> documentation/2.1/failover.**html<http://www.slony.info/documentation/2.1/failover.html>
>
> I think the MOVE SET command is what you want.
>
> You setup 'DR Master' as a subscriber to your sets just like 'slave' was.
>  You then MOVE SET to make 'DR Master' the new origin.  'slave' will
> receive updates from 'DR Master' instead of 'Master' , assuming you have a
> complete path network in place.
>
> Thank you Steve. Make sense to me.

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.

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's there on Master, just the connection string
changes needed. So, I thought changing the connection string should fix.

I read this part of documentation and implemented below steps not for once,
couple of times, this time it never failed.
http://slony.info/documentation/2.1/stmtstorepath.html

1. Stop slon on Master/Slave
2. change store paths with function on DR-master.
aquent_cdb=# select
_myrep.storepath(1,2,'host=*dr-master.com*dbname=master user=postgres
port=5432',10);   ///Note: previsouly it was
from master.com
 storepath
------------
 5000000017
(1 row)
4. Repeat the step 3 on slave to change the provider info.
5. Start slon on DR-Master/slave.

Above steps, went fine and all write operations on dr-master(newly promoted
as master) started publishing on slave.
Correct me if this approach is doable.

--Raghav
_______________________________________________
Slony1-general mailing list
Slony1-general@lists.slony.info
http://lists.slony.info/mailman/listinfo/slony1-general

Reply via email to