This function will remove the data node locally. This will not affect the remote database in any way, it will just update the local index over all existing data nodes.

The data node will be detached from all hypertables that are using it if permissions and data integrity requirements are satisfied. For more information, see detach_data_node.


An error will be generated if the data node cannot be detached from all attached hypertables.

Required Arguments

node_nameTEXTName of the data node.

Optional Arguments

if_existsBOOLEANPrevent error if the data node does not exist. Defaults to false.
forceBOOLEANForce removal of data nodes from hypertables unless that would result in data loss. Defaults to false.
repartitionBOOLEANMake the number of space partitions equal to the new number of data nodes (if such partitioning exists). This ensures that the remaining data nodes are used evenly. Defaults to true.


A boolean indicating if the operation was successful or not.

Sample Usage

To delete a data node named dn1:

SELECT delete_data_node('dn1');

Found an issue on this page?

Report an issue!