Skip to content

sql: don't allow schema changes in weak isolation transactions #100143

@nvb

Description

@nvb

Until we can make this safe, don't allow it.

We used to have the following logic, which we can model this change on:

cockroach/pkg/sql/lease.go

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

Metadata

Metadata

Assignees

Labels

A-read-committedRelated to the introduction of Read CommittedA-schema-changesC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)P-0Issues/test failures with a fix SLA of 2 weeksT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions