Skip to content

Commit

Permalink
Removed backfill historical data on compressed chunks
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Iain Cox <iain@timescale.com>
  • Loading branch information
atovpeko and billy-the-fish authored Nov 26, 2024
1 parent c37140c commit 5fd20c2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 144 deletions.
130 changes: 0 additions & 130 deletions use-timescale/compression/backfill-historical-data.md

This file was deleted.

27 changes: 22 additions & 5 deletions use-timescale/compression/compression-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ you want to segment by.

## Enable a compression policy

This procedure uses an example table, called `example`, and segments it by the
This page uses an example table, called `example`, and segments it by the
`device_id` column. Every chunk that is more than seven days old is then marked
to be automatically compressed. The source data is organized like this:

Expand Down Expand Up @@ -59,13 +59,30 @@ SELECT * FROM timescaledb_information.jobs
For more information, see the API reference for [`timescaledb_information.jobs`][timescaledb_information-jobs].
## Pause compression policy
To disable a compression policy temporarily, find the corresponding job ID and then call `alter_job` to pause it:
```sql
SELECT * FROM timescaledb_information.jobs where proc_name = 'policy_compression' AND relname = 'example'
```
```sql
SELECT alter_job(<job_id>, scheduled => false);
```
To enable it again:
``` sql
SELECT alter_job(<job_id>, scheduled => true);
```
## Remove compression policy
To remove a compression policy, use `remove_compression_policy`. For example, to
remove a compression policy for a hypertable named `cpu`:
To remove a compression policy, use `remove_compression_policy`:
```sql
SELECT remove_compression_policy('cpu');
SELECT remove_compression_policy('example');
```
For more information, see the API reference for
Expand All @@ -77,7 +94,7 @@ You can disable compression entirely on individual hypertables. This command
works only if you don't currently have any compressed chunks:

```sql
ALTER TABLE <TABLE_NAME> SET (timescaledb.compress=false);
ALTER TABLE <EXAMPLE> SET (timescaledb.compress=false);
```

If your hypertable contains compressed chunks, you need to
Expand Down
5 changes: 1 addition & 4 deletions use-timescale/compression/decompress-chunks.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ for actions such as bulk inserts.
</Highlight>

This section describes commands to use for decompressing chunks. You can filter
by time to select the chunks you want to decompress. To learn how to backfill
data, see the [backfilling section][backfill].
by time to select the chunks you want to decompress.

## Decompress chunks manually

Expand Down Expand Up @@ -70,7 +69,5 @@ SELECT tableoid::regclass FROM metrics
_timescaledb_internal._hyper_72_37_chunk
```

[backfill]: /use-timescale/:currentVersion:/compression/backfill-historical-data/
[api-reference-decompress]: /api/:currentVersion:/compression/decompress_chunk/
[api-reference-alter-job]: /api/:currentVersion:/actions/alter_job/

5 changes: 0 additions & 5 deletions use-timescale/page-index/page-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,6 @@ module.exports = [
href: "decompress-chunks",
excerpt: "Decompress data chunks",
},
{
title: "Backfill historical data",
href: "backfill-historical-data",
excerpt: "Backfill historical data to compressed chunks",
},
{
title: "Modify a schema",
href: "modify-a-schema",
Expand Down

0 comments on commit 5fd20c2

Please sign in to comment.