Skip to content

detach_chunk()

Detach a chunk from a hypertable.

Since 2.21.0

Separate a chunk from a hypertable.

Hypertable structure with time-based partitioning into chunks

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.

Detach a chunk from a hypertable:

CALL detach_chunk('_timescaledb_internal._hyper_1_2_chunk');

The syntax is:

CALL detach_chunk(
chunk = '<chunk_name>'
);
NameTypeDescription
chunkREGCLASSName of the chunk to detach.

This function returns void.