Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Continuous aggregates creation not supported by the normalized storage #44

@ivansenic

Description

@ivansenic

I am not 100% sure that what I will write is completely true, but we are using the pg_prometheus with normalized storage for some time now. Today we wanted to create some basic continuous aggregates view so that our dashboards are more responsive when looking to the long-term data.

Unfortunately we constantly fail to do so. Even the most simply aggregate like:

prometheus=# CREATE VIEW basic
prometheus-# WITH (timescaledb.continuous)
prometheus-# AS
prometheus-# SELECT
prometheus-# time_bucket('1 day', time),
prometheus-# sum(value) AS "total"
prometheus-# FROM metrics
prometheus-# GROUP BY time_bucket('1 day', time);
ERROR:  invalid SELECT query for continuous aggregate

fails with the invalid select query error message. The select query itself works without any problem of course.

As I understand this, the creation most likely fails as the metric is not a table, but a view. If this is the case, how can we perform continuous aggregates with the normalized storage? Would I need to go directly to the metrics_labels and metrics_values tables?

Any suggestions would be great here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions