detach_chunk()
Detach a chunk from a hypertable.
Since 2.21.0
Separate a chunk from a hypertable.
The chunk becomes a standalone hypertable with the same name and schema. All existing constraints and indexes on the chunk are preserved after detaching. Foreign keys are dropped.
In this initial release, you cannot detach a chunk that has been converted to the columnstore.
Samples
Section titled “Samples”Detach a chunk from a hypertable:
CALL detach_chunk('_timescaledb_internal._hyper_1_2_chunk');Arguments
Section titled “Arguments”The syntax is:
CALL detach_chunk( chunk = '<chunk_name>');| Name | Type | Description |
|---|---|---|
chunk | REGCLASS | Name of the chunk to detach. |
Returns
Section titled “Returns”This function returns void.