Follow us on Twitter...
Stay up to date with the latest news, special offers and advice from CensorNet on Twitter... we are Tweeting regularly!
You have a replication cluster where one or more nodes are no longer active and need to be removed from the cluster
The correct procedure is to decommission the node whilst it is still online thus maintaining the consistency of the cluster. You should follow the instructions on removing a node in the Replication Guide.
If the node is destroyed and you cannot reconnect it to the cluster to remove it gracefully, you can perform the following steps on the master as root.
In the Replication Manager, find the Node ID of the node you want to remove. Then issue the following commands on the master server, replacing NODE_ID with the appropriate ID:
su - postgres
psql censornet
select _cn_cluster.dropnode(NODE ID);
delete from tbl_nodes where node_id = NODE_ID;
You should now clean up the slave node, in case the replication schema was not removed properly.
Log as root on the slave node and type the following commands:
su postgres
psql censornet
(double check you are on the SLAVE node!)
drop schema _cn_cluster CASCADE;
Then press Ctrl+D twice to exit back to the command prompt.