Skip to content

Conversation

@rafiss
Copy link
Collaborator

@rafiss rafiss commented Jan 21, 2026

Previously, when attempting to set exclude_data_from_backup on a table with inbound foreign key constraints, the error was raised without a proper pgcode (defaulting to XXUUU). This made it difficult for the schemachange workload to handle the error appropriately.

This change adds pgcode.ObjectNotInPrerequisiteState (55000) to the error in both the legacy and declarative schema changers, and updates the schemachange workload to expect this error as a potential execution error when setting the exclude_data_from_backup storage parameter.

Fixes: #161167

Release note: None

Previously, when attempting to set `exclude_data_from_backup` on a table
with inbound foreign key constraints, the error was raised without a
proper pgcode (defaulting to XXUUU). This made it difficult for the
schemachange workload to handle the error appropriately.

This change adds `pgcode.ObjectNotInPrerequisiteState` (55000) to the
error in both the legacy and declarative schema changers, and updates
the schemachange workload to expect this error as a potential execution
error when setting the `exclude_data_from_backup` storage parameter.

Fixes: cockroachdb#161167

Release note: None
@rafiss rafiss requested review from fqazi and shghasemi January 21, 2026 02:52
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rafiss rafiss marked this pull request as ready for review January 21, 2026 15:11
@rafiss rafiss requested review from a team as code owners January 21, 2026 15:11
@rafiss rafiss requested review from golgeek and nameisbhaskar and removed request for a team January 21, 2026 15:12
Copy link
Contributor

@shghasemi shghasemi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafiss
Copy link
Collaborator Author

rafiss commented Jan 21, 2026

tftr!

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 21, 2026

@craig craig bot merged commit 9c89481 into cockroachdb:master Jan 21, 2026
29 checks passed
@rafiss rafiss deleted the exclude-data-from-backup-pgcode branch January 22, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

roachtest: schemachange/random-load failed

3 participants