1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| -- chunk 확인하기
SELECT show_chunks('public.cheese_table_name');
-- policy 먼저 확인하기
SELECT j.job_id
FROM timescaledb_information.jobs j
WHERE j.proc_name = 'policy_compression'
AND j.hypertable_name = 'public.cheese_table_name'; -- 1006
-- policy 멈춰주기
SELECT alter_job(<job_id>, scheduled => false);
SELECT alter_job(1006, scheduled => false);
-- chunk decompression 하기
SELECT decompress_chunk('_timescaledb_internal.<chunk_name>');
-- policy 다시 활성화 시켜주기
SELECT alter_job(<job_id>, scheduled => true);
SELECT alter_job(1006, scheduled => true);
|