-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: don't allow schema changes in weak isolation transactions #100143
Copy link
Copy link
Closed
Labels
A-read-committedRelated to the introduction of Read CommittedRelated to the introduction of Read CommittedA-schema-changesC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)P-0Issues/test failures with a fix SLA of 2 weeksIssues/test failures with a fix SLA of 2 weeksT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Description
Until we can make this safe, don't allow it.
We used to have the following logic, which we can model this change on:
Lines 320 to 325 in f0ac764
| // Use SERIALIZABLE transactions so that the ModificationTime on the | |
| // descriptor is the commit timestamp. | |
| if txn.Isolation() != enginepb.SERIALIZABLE { | |
| return pgerror.NewErrorf(pgerror.CodeInvalidTransactionStateError, | |
| "transaction involving a schemas change needs to be SERIALIZABLE") | |
| } |
Jira issue: CRDB-26563
Epic CRDB-26546
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-read-committedRelated to the introduction of Read CommittedRelated to the introduction of Read CommittedA-schema-changesC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)P-0Issues/test failures with a fix SLA of 2 weeksIssues/test failures with a fix SLA of 2 weeksT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)