Skip to content

Commit 488a412

Browse files
[Update] Decompression (timescale#2552)
* add decompression note and example * Update decompress-chunks.md remove white spaces Signed-off-by: Rajakavitha Kodhandapani <[email protected]> --------- Signed-off-by: Rajakavitha Kodhandapani <[email protected]> Co-authored-by: Lana Brindley <[email protected]>
1 parent 6e1262f commit 488a412

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

use-timescale/compression/decompress-chunks.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ data, see the [backfilling section][backfill].
2929

3030
There are several methods for selecting chunks and decompressing them.
3131

32+
<Highlight type="note">
33+
Before decompressing chunks, stop any compression policy
34+
on the hypertable you are decompressing. When you finish backfilling or updating
35+
data, turn the policy back on. The database automatically recompresses your
36+
chunks in the next scheduled job.
37+
</Highlight>
38+
3239
### Decompress individual chunks
3340

3441
To decompress a single chunk by name, run this command:
@@ -45,10 +52,13 @@ To decompress a set of chunks based on a time range, you can use the output of
4552
`show_chunks` to decompress each one:
4653

4754
```sql
48-
SELECT decompress_chunk(i)
49-
FROM show_chunks('table_name', older_than, newer_than) i;
55+
SELECT decompress_chunk(c, true)
56+
FROM show_chunks('table_name', older_than, newer_than) c;
5057
```
5158

59+
For more information about the `decompress_chunk` function, see the `decompress_chunk`
60+
[API reference][api-reference-decompress].
61+
5262
### Decompress chunks on more precise constraints
5363

5464
If you want to use more precise matching constraints, for example space
@@ -65,3 +75,4 @@ SELECT tableoid::regclass FROM metrics
6575
```
6676

6777
[backfill]: /use-timescale/:currentVersion:/compression/backfill-historical-data/
78+
[api-reference-decompress]: /api/:currentVersion:/compression/decompress_chunk/

0 commit comments

Comments
 (0)