Multi-node support has been deprecated with TimescaleDB 2.13. This is the last version that includes multi-node support and it supports multi-node installations with PostgreSQL versions 13, 14, and 15.
Learn more about it here.
When you are working within a multi-node environment, you might discover that you need more or fewer data nodes in your cluster over time. You can choose how many of the available nodes to use when creating a distributed hypertable. You can also add and remove data nodes from your cluster, and move data between chunks on data nodes as required to free up storage.
You can check which data nodes are in use by a distributed hypertable, using
this query. In this example, our distributed hypertable is called
The result of this query looks like this:
By default, when you create a distributed hypertable, it uses all available
data nodes. To restrict it to specific nodes, pass the
data_nodes argument to
When you add additional data nodes to a database, you need to add them to the distributed hypertable so that your database can use them.
On the access node, at the
psqlprompt, add the data node:
Attach the new data node to the distributed hypertable:
When you attach a new data node, the partitioning configuration of the distributed hypertable is updated to account for the additional data node, and the number of hash partitions are automatically increased to match. You can prevent this happening by setting the function parameter
When you attach a new data node to a distributed hypertable, you can move existing data in your hypertable to the new node to free up storage on the existing nodes and make better use of the added capacity.
The ability to move chunks between data nodes is an experimental feature that is under active development. We recommend that you do not use this feature in a production environment.
Move data using this query:
The move operation uses a number of transactions, which means that you cannot roll the transaction back automatically if something goes wrong. If a move operation fails, the failure is logged with an operation ID that you can use to clean up any state left on the involved nodes.
Clean up after a failed move using this query. In this example, the operation ID
of the failed move is
You can also remove data nodes from an existing distributed hypertable.
You cannot remove a data node that still contains data for the distributed hypertable. Before you remove the data node, check that is has had all of its data deleted or moved, or that you have replicated the data on to other data nodes.
Remove a data node using this query. In this example, our distributed hypertable
Found an issue on this page?Report an issue!