Skip to content

Catalog updates to support granular refresh - #10357

Merged
melihmutlu merged 1 commit into
timescale:mainfrom
melihmutlu:cagg_granular_catalog_part2
Jul 30, 2026
Merged

Catalog updates to support granular refresh#10357
melihmutlu merged 1 commit into
timescale:mainfrom
melihmutlu:cagg_granular_catalog_part2

Conversation

@melihmutlu

Copy link
Copy Markdown
Member

Add a nullable seqnum column to both continuous_aggs_hypertable_invalidation_log and continuous_aggs_materialization_invalidation_log so invalidation entries can be matched up with granular trackings. NULL means the entry has no associated granular tracking.

Also, add a granular_refresh_enabled flag (default FALSE) to the continuous_agg catalog table, marking caggs that opt into granular refresh.

Both catalogs require rebuild.

@melihmutlu melihmutlu added this to the v2.30.0 milestone Jul 29, 2026
@melihmutlu
melihmutlu requested a review from a team July 29, 2026 09:39
@github-actions
github-actions Bot requested review from antekresic and svenklemm July 29, 2026 09:43
@github-actions

Copy link
Copy Markdown

@antekresic, @svenklemm: please review this pull request.

Powered by pull-review

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.78261% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tsl/src/continuous_aggs/invalidation.c 83.33% 3 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

Comment thread sql/updates/latest-dev.sql Outdated
Comment thread sql/updates/latest-dev.sql Outdated
@melihmutlu
melihmutlu force-pushed the cagg_granular_catalog_part2 branch 2 times, most recently from 7a73b8f to 21a9842 Compare July 29, 2026 22:03
Comment thread sql/updates/latest-dev.sql Outdated
@melihmutlu
melihmutlu force-pushed the cagg_granular_catalog_part2 branch 4 times, most recently from 3bf4c01 to 3ece649 Compare July 30, 2026 09:50
Following updates on two catalogs to support granular refresh:

- Add seqnum column to cagg invalidation logs to both
continuous_aggs_hypertable_invalidation_log and
continuous_aggs_materialization_invalidation_log so invalidation
entries can be matched up with granular trackings. NULL
means the entry has no associated granular tracking.

- Add granular_refresh_enabled to continuous_agg
Add a granular_refresh_enabled flag (default FALSE) to the
continuous_agg catalog table, marking caggs that opt into granular
refresh.

Also, this updates upgrade/downgrade tests to cover seqnum in
invalidation log verifications.

Removes FK on continuous_aggs_materialization_ranges to continuous_agg
to isolate continuous_aggs_materialization_ranges as it's deprecated.

Co-authored-by: gayyappan <gayathri@timescale.com>
@melihmutlu
melihmutlu enabled auto-merge (squash) July 30, 2026 21:56
auto-merge was automatically disabled July 30, 2026 21:56

Head branch was modified

@melihmutlu
melihmutlu force-pushed the cagg_granular_catalog_part2 branch from 3ece649 to c4d4539 Compare July 30, 2026 21:57
@melihmutlu
melihmutlu enabled auto-merge (squash) July 30, 2026 22:06
@melihmutlu
melihmutlu merged commit 95b19a2 into timescale:main Jul 30, 2026
63 of 64 checks passed
@melihmutlu
melihmutlu deleted the cagg_granular_catalog_part2 branch July 30, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants