Skip to content

fix(schema): rebuild aggregation index on upgrade#670

Open
janbjorge wants to merge 1 commit into
mainfrom
jb/fix-aggregation-index-upgrade
Open

fix(schema): rebuild aggregation index on upgrade#670
janbjorge wants to merge 1 commit into
mainfrom
jb/fix-aggregation-index-upgrade

Conversation

@janbjorge

Copy link
Copy Markdown
Owner

The aggregation index change in #668 edited an existing upgrade yield in place, flipping ((1)) to the composite while keeping CREATE INDEX IF NOT EXISTS. On existing deployments the index name already exists, so the statement is a no-op and the composite is never built -- the WHERE NOT aggregated speedup reaches only fresh installs.

Restore the historical yield to ((1)) and append a DROP INDEX IF EXISTS plus CREATE composite step, following the append-only idempotent migration pattern. Install DDL is unchanged (already composite).

Add a regression test that seeds the legacy ((1)) index, runs upgrade, and asserts the index is rebuilt as the composite.

Summary

  • Provide a short description of the changes.
  • Reference related issues when applicable.

Testing

  • make check passed
  • Additional testing steps

Checklist

  • I have read the Contributing Guide
  • I have added or updated tests
  • I have updated documentation if necessary

The aggregation index change in #668 edited an existing upgrade yield
in place, flipping ((1)) to the composite while keeping CREATE INDEX IF
NOT EXISTS. On existing deployments the index name already exists, so
the statement is a no-op and the composite is never built -- the WHERE
NOT aggregated speedup reaches only fresh installs.

Restore the historical yield to ((1)) and append a DROP INDEX IF EXISTS
plus CREATE composite step, following the append-only idempotent
migration pattern. Install DDL is unchanged (already composite).

Add a regression test that seeds the legacy ((1)) index, runs upgrade,
and asserts the index is rebuilt as the composite.
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.

1 participant