-
Notifications
You must be signed in to change notification settings - Fork 4.1k
workload/schemachange: allow pgcode.NoPrimaryKey when primary key is dropped #57493
Copy link
Copy link
Closed
Labels
A-random-schema-change-workloadC-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Description
When dropConstraint is called on the primary key of a table, subsequent DDLs in the transaction on the same table should expect a pgcode.NoPrimaryKey on execution.
This should apply to all DDLs except for the case when add constraint ... primary key follows the dropping of the primary key (see https://www.cockroachlabs.com/docs/v20.2/add-constraint#changing-primary-keys-with-add-constraint-primary-key)
Examples of failures (roachtest):
#56081 (comment)
#56081 (comment)
#56081 (comment)
#56081 (comment)
#56081 (comment)
#56081 (comment)
Jira issue: CRDB-3527
Epic CRDB-19168
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-random-schema-change-workloadC-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)