Skip to content

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Oct 3, 2025

Previously, we adjusted the schema changer rules to ensure that old secondary indexes are only dropped when the new secondary index is usable. Unfortunately, one of the rules had an incorrect filter. To address this, this patch fixes the filter to expect the new secondary index, which will have the new flag.

Fixes: #154751

Release note: None

Previously, we adjusted the schema changer rules to ensure that
old secondary indexes are only dropped when the new secondary index is
usable. Unfortunately, one of the rules had an incorrect filter. To
address this, this patch fixes the filter to expect the new secondary
index, which will have the new flag.

Fixes: cockroachdb#154751

Release note: None
@fqazi fqazi added the backport-25.4.x Flags PRs that need to be backported to 25.4 label Oct 3, 2025
Copy link

blathers-crl bot commented Oct 3, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-25.4.x Flags PRs that need to be backported to 25.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql/schemachanger: fix incorrect filter for secondary index recreation during a pk swap
2 participants