Open pavanfhw opened 2 years ago
@timescale/o11y-applications seems like this is an issue in promscale itself.
cc @VineethReddy02
Having the same issue. This prevents us from using move_chunks
altogether because index_destination_tablespace
is a required argument.
Not running it in K8s by the way, deployed on a VM
I transferred this issue to promscale repository as it seems more like the problem with the application than helm charts.
Hey! The move_chunk
command requires either existing hypertable index to be marked as CLUSTERED (in PostgreSQL) or hypertable index needs to be supplied in the command explicitly.
So for example if we have a following metric hypertable:
tsdb=> \d+ prom_data.go_gc_duration_seconds
Table "prom_data.go_gc_duration_seconds"
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description
-----------+--------------------------+-----------+----------+---------+---------+-------------+--------------+-------------
time | timestamp with time zone | | not null | | plain | | |
value | double precision | | not null | | plain | | |
series_id | bigint | | not null | | plain | | |
Indexes:
"data_series_id_time_25" UNIQUE, btree (series_id, "time") INCLUDE (value)
Triggers:
ts_insert_blocker BEFORE INSERT ON prom_data.go_gc_duration_seconds FOR EACH ROW EXECUTE FUNCTION _timescaledb_internal.insert_blocker()
Child tables: _timescaledb_internal._hyper_129545_191127_chunk,
_timescaledb_internal._hyper_129545_191653_chunk,
_timescaledb_internal._hyper_129545_192058_chunk
Access method: heap
Options: autovacuum_vacuum_insert_threshold=50000, autovacuum_vacuum_insert_scale_factor=2.0, autovacuum_analyze_threshold=50000, autovacuum_analyze_scale_factor=0.5
And we want to move chunk _timescaledb_internal._hyper_129545_192058_chunk
from tablespace ts1
to ts2
, we need to run:
select move_chunk('_timescaledb_internal._hyper_129545_192058_chunk', 'ts1', 'ts2', 'prom_data.data_series_id_time_25')
I hope this helps. I believe our docs should be improved to make this more obvious (https://docs.timescale.com/api/latest/hypertable/move_chunk/)
Describe the bug I'm using timescaledb-single chart with prometheus (+promscale) I'm trying to create a data retention policy following this and this For testing pourpuses, I created a tablespace then I run the move_chunk function:
Do I need to run any aditional steps? Timescaledb does not create the necessary indexes for move_chunks action? The final intention is to automate moving old chunks to a second slower storage mounted on the container.
To Reproduce Install helm chart timescaledb-single Deploy promscale and prometheus
Expected behavior Chunk to be moved
Deployment
values.yaml
Deployment Please share some details of what is in your Kubernetes environment, for example: