Outdated Version

You are viewing an older version of this section. View current production version.


Removes a leaf node from a cluster and rebalances its partitions into the rest of the cluster.

REMOVE LEAF 'host':port [FORCE]


  • Port (default 3306) is optional.
  • If the leaf does not have a pair, MemSQL will rebalance its partitions onto the remaining leaves before removing it. After this rebalance process is over, the partition databases that were moved are no longer present on the node.
  • You must use the ADD LEAF command if you want to reintroduce the removed leaf into the system.
  • This command must be run on the master aggregator node (see Node Requirements for MemSQL Commands ).
  • The FORCE flag disables the rebalancing behavior of REMOVE LEAF. This behavior is designed to keep the database online while you remove a leaf from the system. However, if you are performing maintenance and want to quickly remove a leaf node without keeping the database online, then use the FORCE flag to disable automatic rebalancing.


memsql> REMOVE LEAF '':3306;