In TimescaleDB 2.11 and later, you can insert data into compressed chunks, and modify data in compressed rows.
This feature requires PostgreSQL 14 or later
In TimescaleDB 2.11 and later, you can insert data into compressed chunks. This works even if the data you are inserting has unique constraints, and those constraints are preserved during the insert operation. This is done by using a PostgreSQL function that decompresses relevant data during the insert to check if the new data breaks unique checks. This means that any time you insert data into a compressed chunk, a small amount of data is decompressed to allow a speculative insertion, and block any inserts which could violate constraints.
In TimescaleDB 2.11 and later, you can also use
commands to modify existing rows in compressed chunks. This works in a similar
way to insert operations, where a small amount of data is decompressed to be
able to run the modifications. The system attempts to only decompress data that
is necessary, to reduce the amount decompression that is done, but in some cases
the modification commands can end up decompressing a large amount of data. This
often happens if there are no qualifiers, or if the qualifiers can't be used to
filter. You can try and avoid this by using columns for
orderby, which allows as much data as possible to be filtered out before the
decompression and modification operations.
Found an issue on this page?Report an issue!