decompress_chunk() Community

If you need to modify or add data to a chunk that has already been compressed, you will need to decompress the chunk first. This is especially useful for backfilling old data.

TIP:Prior to decompressing chunks for the purpose of data backfill or updating you should first stop any compression policy that is active on the hypertable you plan to perform this operation on. Once the update and/or backfill is complete simply turn the policy back on and the system will recompress your chunks.

Required Arguments

NameDescription
chunk_name(REGCLASS) Name of the chunk to be decompressed.

Optional Arguments

NameDescription
if_compressed(BOOLEAN) Setting to true will skip chunks that are not compressed. Defaults to false.

Sample Usage

Decompress a single chunk

  1. SELECT decompress_chunk('_timescaledb_internal._hyper_2_2_chunk');