David Parker dparker
Wed Nov 17 15:34:31 PST 2004
My understanding is that doing a slonik FAILOVER to Node 2 (followed by
DROP NODE, as recommended in the doc) completely removes Node 1, such
that it has to be re-built by re-adding and re-subscribing it to Node 2.
The only way currently to get the data into Node 1 is to let it sync up
after the re-subscribe.

If you have the option of doing an orderly transfer, i.e., your failover
is a manual process, you should look at the slonik command MOVE SET. You
can use this to switch ownership of the replication set from Node 1 to
Node 2. The nice thing about this command is that Node 1 is
automatically made a subscriber of the set, so that it can continue to
get synchronized as updates happen on Node 2.

- DAP

>-----Original Message-----
>From: slony1-general-bounces at gborg.postgresql.org 
>[mailto:slony1-general-bounces at gborg.postgresql.org] On Behalf 
>Of Pallav Kalva
>Sent: Wednesday, November 17, 2004 10:17 AM
>To: slony1-general at gborg.postgresql.org
>Subject: [Slony1-general] How to Rebuild after Failover
>
>Hi,
>
>     I am in the process of testing the Slony replication , I 
>am replicating a table from Node 1 (master) to Node 2 (slave). 
>In order to test the failover scenario, i ran the failover 
>command on Node 2 (slave) and made Node 2 master now after 
>running the failover command and also i ran the "drop node" 
>command which will take out the Node 1 completely from replication.
>    Now, I want to make Node 1 as master and make Node 2 as 
>slave, assuming the Node 1 was offline while i was running the 
>failover and drop commands on Node 2 , also assuming that some 
>of the last transactions didnt get replicated over to Node 2. 
>After few hours if the Node 1 comes up with all the data and 
>everything is in place as it was before it went down.
>    What should I do now ? do i have to drop all the table 
>data even the data which was not replicated to Node 2 and take 
>a backup from Node 2 restore on Node 1 and start the whole 
>replication allover again with initializing cluster, running 
>slon daemons and subscribing the replication sets ?  or can I 
>keep the table data on Node 1 as it is and start the 
>replication allover again , will this keep my tables in sync 
>with same data on both the  nodes ?
>
>Thanks!
>Pallav
>
>_______________________________________________
>Slony1-general mailing list
>Slony1-general at gborg.postgresql.org
>http://gborg.postgresql.org/mailman/listinfo/slony1-general
>


More information about the Slony1-general mailing list