Recompresses a compressed chunk that had more data inserted after compression.
You can also recompress chunks by
running the job associated with your compression policy.
recompress_chunk gives you more fine-grained control by
allowing you to target a specific chunk.
recompress_chunk is deprecated since version 2.14 and will be removed in the future. The procedure is now a wrapper which calls
compress_chunk instead of it.
recompress_chunk is implemented as an SQL procedure and not a function. Call the procedure with
CALL. Don't use a
recompress_chunk only works on chunks that have previously been compressed. To compress a chunk for the first time, use
|The chunk to be recompressed. Must include the schema, for example
_timescaledb_internal, if it is not in the search path.
true, prints a notice instead of erroring if the chunk is already compressed. Defaults to
Recompress the chunk
In TimescaleDB 2.6.0 and above,
recompress_chunk is implemented as a procedure.
Previously, it was implemented as a function. If you are upgrading to
TimescaleDB 2.6.0 or above, the
function could cause an error. For example, trying to run
recompress_chunk(i.show_chunks, true) FROM... gives the following error:
To fix the error, use
CALL instead of
SELECT. You might also need to write a
procedure to replace the full functionality in your
SELECT statement. For
Found an issue on this page?Report an issue!