Warning
Multi-node support is deprecated.
TimescaleDB v2.13 is the last release that includes multi-node support for PostgreSQL versions 13, 14, and 15.
set_number_partitions()
CommunityCommunity functions are available under Timescale Community Edition. Click to learn more.Sets the number of partitions (slices) of a space dimension on a hypertable. The new partitioning only affects new chunks.
Name | Type | Description |
---|---|---|
hypertable | REGCLASS | Hypertable to update the number of partitions for. |
number_partitions | INTEGER | The new number of partitions for the dimension. Must be greater than 0 and less than 32,768. |
Name | Type | Description |
---|---|---|
dimension_name | REGCLASS | The name of the space dimension to set the number of partitions for. |
The dimension_name
needs to be explicitly specified only if the
hypertable has more than one space dimension. An error is thrown
otherwise.
For a table with a single space dimension:
SELECT set_number_partitions('conditions', 2);
For a table with more than one space dimension:
SELECT set_number_partitions('conditions', 2, 'device_id');
Keywords
Found an issue on this page?Report an issue or Edit this page in GitHub.