Fix continuous aggregate column rename breaking materialized_only toggle#9292
Merged
Fix continuous aggregate column rename breaking materialized_only toggle#9292
Conversation
|
@pnthao, @erimatnor: please review this pull request.
|
111495c to
2269f86
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
antekresic
reviewed
Feb 23, 2026
9868e6d to
b19d6e3
Compare
antekresic
approved these changes
Feb 24, 2026
melihmutlu
approved these changes
Feb 25, 2026
Renaming a column on a continuous aggregate left the stored query trees in pg_rewrite out of sync with pg_attribute. Toggling materialized_only afterwards failed with "SELECT rule's target entry has different column name" because build_union_query / destroy_union_query read stale names. The start handler now returns DDL_DONE for continuous aggregates since all views (including the user view) are renamed explicitly, and PostgreSQL's standard rename must be skipped to avoid a double-rename error. Fixes #7800
b19d6e3 to
d94312b
Compare
natalya-aksman
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renaming a column on a continuous aggregate left the stored query trees
in pg_rewrite out of sync with pg_attribute. Toggling materialized_only
afterwards failed with "SELECT rule's target entry has different column
name" because build_union_query / destroy_union_query read stale names.
The start handler now returns DDL_DONE for continuous aggregates since
all views (including the user view) are renamed explicitly, and
PostgreSQL's standard rename must be skipped to avoid a double-rename
error.
Fixes #7800