Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can't add retention policy or drop chunks, inconclusive whether it is an hypertable #5554

Closed
glysbaysb opened this issue Apr 12, 2023 · 2 comments
Labels

Comments

@glysbaysb
Copy link

What type of bug is this?

Unexpected error

What subsystems and features are affected?

Other

What happened?

I have verified that I do have data in my table.

select * from node_cpu_guest_seconds_total limit 2;
            time            | value | series_id |        labels        | cpu_id | instance_id | job_id | mode_id 
----------------------------+-------+-----------+----------------------+--------+-------------+--------+---------
 2023-04-08 16:00:21.251+00 |     0 |       302 | {25,367,262,263,388} |    367 |         262 |    263 |     388
 2023-04-08 16:01:21.251+00 |     0 |       302 | {25,367,262,263,388} |    367 |         262 |    263 |     388

And wanted to add a retention policy

# SELECT drop_chunks('node_cpu_guest_seconds_total', INTERVAL '3 weeks');
ERROR:  "node_cpu_guest_seconds_total" is not a hypertable or a continuous aggregate
HINT:  The operation is only possible on a hypertable or continuous aggregate.

Is it an hypertable?

select * from _timescaledb_catalog.hypertable where table_name = 'node_cpu_guest_seconds_total';
 id | schema_name |          table_name          | associated_schema_name | associated_table_prefix | num_dimensions | chunk_sizing_func_schema |  chunk_sizing_func_name  | chunk_target_size | compression_state | compressed_hypertable_id | replication_factor 
----+-------------+------------------------------+------------------------+-------------------------+----------------+--------------------------+--------------------------+-------------------+-------------------+--------------------------+--------------------
 59 | prom_data   | node_cpu_guest_seconds_total | _timescaledb_internal  | _hyper_59               |              1 | _timescaledb_internal    | calculate_chunk_interval |                 0 |                 1 |                       69 |   

And if I want to try and convert it to an hypertable I get

SELECT create_hypertable('node_cpu_guest_seconds_total', 'time');
ERROR:  invalid relation type

TimescaleDB version affected

2.10.1

PostgreSQL version used

14.7

What operating system did you use?

Ubuntu 22.04.2 LTS

What installation method did you use?

Deb/Apt

What platform did you run on?

On prem/Self-hosted

Relevant log output and stack trace

No response

How can we reproduce the bug?

I have installed promscale, and wrote directly to it with prometheus remote_write. All the tables have been automatically created
@glysbaysb glysbaysb added the bug label Apr 12, 2023
@ramonguiu
Copy link

@glysbaysb node_cpu_guest_seconds_total is not a hypertable but a view. The underlying hypertable is prom_data.node_cpu_guest_seconds_total.

Please keep in mind that Promscale has been discontinued and is not longer maintained / supported. More info here.

@glysbaysb
Copy link
Author

Ah so it was an error on ym side. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants