Hi All,

 

I am doing testing for the failover and failback of Slony and also
documenting this done to better understand how this can be done. I have
setup 2 node (Master and Slave) test servers.

 

N1 - Master

N2 - Slave

 

Cluster Setup

------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------------

# INIT CLUSTER

cluster name = testrepl;

 node 1 admin conninfo='host=db01 dbname=testdb user=postgres port=5432
password=xxx';

 node 2 admin conninfo='host=db02 dbname=testdb user=postgres port=5432
password=xxx';

  init cluster (id = 1, comment = 'Node 1 - tes...@db01');

 

# STORE NODE

  store node (id = 2, event node = 1, comment = 'Node 2 - tes...@db02');

  echo 'Set up replication nodes';

 

# STORE PATH

  echo 'Next: configure paths for each node/origin';

  store path (server = 1, client = 2, conninfo = 'host=db01
dbname=testdb user=postgres port=5432 password=xxx');

  store path (server = 2, client = 1, conninfo = 'host=db02
dbname=testdb user=postgres port=5432 password=xxx');

------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------------

 

In normal operation, N2 is subscribed to N1. Assuming I issue a failover
command to "Slonik_failover n1 n2" and N2 becomes the Master node and
operation is running smoothly and I issue a slonik_drop_node to fully
clear the cluster config of N1.

 

Next I fixed up N1 to operational status and want to put it back into
the cluster and sync it with N2,

1.      What do I need to do to introduce it back into the cluster?
(sample config or command)
2.      After N1 is fully synced with N2, what do I need to do to switch
the Master role back to N1? (sample config or command)
3.      Steps in sequence to execute the above scenario.

 

Regards,

Lawrence Giam

  <http://www.globalitcreations.com> 
........................................................................
..........................
Lawrence Giam | Global IT Creations Pte Ltd |  Network Administrator  
website: http://www.globalitcreations.com
phone: +65 6836 4768 ext 115| fax: + 65 6836 4736 | mobile: + 65 9758
7448 

 

<<image001.jpg>>

_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general

Reply via email to