IBM Netezza Replication Services, Version 1.6

Initiating a switchover from a subordinate

When you cannot initiate a switchover from the master (for example, because the master is not accessible), you can initiate the switchover from a subordinate.

Procedure

  1. Demote the original master by issuing the following command on the original subordinate NPS® node:
    ALTER REPLICATION NODE <replsetname>.<masternodename> ROLE
    SUBORDINATE OVERRIDE;
  2. From the NPS node, issue the following command to verify that the original master node's role is now subordinate and the node state is suspended:
    SELECT * FROM _v_replication_set_node;
  3. From each subordinate replication log server, including the log server of the newly demoted master, issue the following command to ensure that all hosts have the same set of replication files:
    ptsrecover -equalize 
  4. Wait for queued transactions on the subordinate to be processed. Verify that the transactions are processed by running the following NPS query until it shows no pending transactions:
    SELECT pending_transactions FROM _v_replication_queue_length;
  5. Promote the chosen subordinate by issuing the following command on that subordinate’s NPS node:
    ALTER REPLICATION NODE <replsetname>.<subordinatename> ROLE MASTER
    OVERRIDE;
  6. Check that the chosen subordinate node's role is now master and the node state is suspended by issuing the following command on the NPS node:
    SELECT * FROM _v_replication_set_node;
  7. Activate the chosen subordinate by issuing the following command on its NPS node:
    ALTER REPLICATION NODE <replsetname>.<subordinatename> STATE
    ACTIVE;
  8. Check that the node state is now active for the chosen subordinate (now the master) by issuing the following command on its NPS node:
    SELECT * FROM _v_replication_set_node;


Feedback