31.1. Removing an Existing Coordinator

Assume a two coordinator cluster, COORD_1 and COORD_2. Suppose we want to remove COORD_2 for any reason. Following steps should be performed to remove an existing coordinator from a running cluster:

  1. Stop the coordinator to be removed. In our example we need to stop COORD_2.

  2. Connect to any of the coordinators except the one to be removed. In our example assuming COORD_1 is running on port 5432, the following command would connect to COORD_1

              psql postgres -p 5432
            
  3. Drop the coordinator to be removed. For example to drop coordinator COORD_2

              DROP NODE COORD_2;
            
  4. Update the connection information cached in pooler.

              SELECT pgxc_pool_reload();
            

COORD_2 is now removed from the cluster and COORD_1 would work as if COORD_2 never existed.

CAUTION : If COORD_2 is still running and clients are connected to it, any queries issued would create inconsistencies in the cluster.