Skip to content

[Feature]: Support adding columns to existing continuous aggregates #5851

Description

@noctarius

What problem does the new feature solve?

Continuous aggregates are one of the major features of TimescaleDB. A common, and proposed, use case is to expire raw data at some point after the continuous aggregate time bucket is materialized. That means, recalculation of old continuous aggregate time buckets (hence chunks) isn't possible.

Over time, additional columns may be added to the underlying raw data hypertable, though. Especially in wide table layouts. Due to the immutability of the continuous aggregate definition, adding those additional columns isn't supported, and an additional continuous aggregate needs to be created which complicates querying and management.

It'd be awesome to support adding columns (or maybe even deleting columns).

What does the feature do?

This feature will add support for something like (the non-existent) ALTER MATERIALIZED VIEW ADD COLUMN .... Since the syntax isn't supported in PostgreSQL, some alternative way would be required, such as a function to make it work.

Implementation challenges

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions