Skip to main content
Old API since v2.18.0. Superseded by convert_to_rowstore(). However, compression APIs are still supported, you do not need to migrate to the hypercore APIs.
Before decompressing s, stop any compression policy on the you are decompressing. You can use SELECT alter_job(JOB_ID, scheduled => false); to prevent scheduled execution.

Samples

Decompress a single :
SELECT decompress_chunk('_timescaledb_internal._hyper_2_2_chunk');
Decompress all compressed s in a named metrics:
SELECT decompress_chunk(c, true) FROM show_chunks('metrics') c;

Arguments

The syntax is:
SELECT decompress_chunk(
    uncompressed_chunk = '<chunk_name>',
    if_compressed = true | false
);
NameTypeDefaultRequiredDescription
chunk_nameREGCLASS-Name of the to be decompressed.
if_compressedBOOLEANtrue-Disabling this will make the function error out on s that are not compressed.

Returns

ColumnTypeDescription
decompress_chunkREGCLASSName of the that was decompressed.