Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

Latest commit

 

History

History
59 lines (40 loc) · 1.52 KB

File metadata and controls

59 lines (40 loc) · 1.52 KB
api_name decompress_chunk()
excerpt Decompress a compressed chunk
topics
compression
keywords
compression
decompression
chunks
backfilling
api
license type
community
function
products
cloud
mst
self_hosted

import Deprecated2180 from "versionContent/_partials/_deprecated_2_18_0.mdx";

decompress_chunk() Community

Superseded by convert_to_rowstore(). However, compression APIs are still supported, you do not need to migrate to the hypercore APIs.

Before decompressing chunks, stop any compression policy on the hypertable you are decompressing. You can use SELECT alter_job(JOB_ID, scheduled => false); to prevent scheduled execution.

Samples

Decompress a single chunk:

SELECT decompress_chunk('_timescaledb_internal._hyper_2_2_chunk');

Decompress all compressed chunks in a hypertable named metrics:

SELECT decompress_chunk(c, true) FROM show_chunks('metrics') c;

Required arguments

Name Type Description
chunk_name REGCLASS Name of the chunk to be decompressed.

Optional arguments

Name Type Description
if_compressed BOOLEAN Disabling this will make the function error out on chunks that are not compressed. Defaults to true.

Returns

Column Type Description
decompress_chunk REGCLASS Name of the chunk that was decompressed.