Manually decompress compressed chunks by name, time, or more precise constraints
Old API since 2.18.0. Superseded by
convert_to_rowstore. However, compression APIs are still supported, you do not need to migrate
to the hypercore APIs.
When compressing your data, you can reduce the amount of storage space used. But you should always leave some additional
storage capacity. This gives you the flexibility to decompress chunks when necessary, for actions such as bulk inserts.
This section describes commands to use for decompressing chunks. You can filter by time to select the chunks you want to
decompress.
Before decompressing chunks, stop any compression policy on the you are decompressing. The database
automatically recompresses your chunks in the next scheduled job. If you accumulate a large amount of chunks that need
to be compressed, the troubleshooting guide shows how to compress a backlog of chunks. For
more information on how to stop and run compression policies using alter_job(), see the API reference.There are several methods for selecting chunks and decompressing them.
If you want to use more precise matching constraints, for example space partitioning, you can construct a command like
this:
SELECT tableoid::regclass FROM metrics WHERE time = '2000-01-01' AND device_id = 1 GROUP BY tableoid; tableoid------------------------------------------ _timescaledb_internal._hyper_72_37_chunk