8000 sql: support DDL in read committed transactions · Issue #114778 · cockroachdb/cockroach · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
sql: support DDL in read committed transactions #114778
Open
@michae2

Description

@michae2

We currently do not allow DDL statements like CREATE TABLE, CREATE SCHEMA, CREATE INDEX, etc. within explicit read committed transactions when autocommit_before_ddl is off. Postgres allows these statements within read committed transactions.

A demonstration is something like:

SET autocommit_before_ddl = off;
SET CLUSTER SETTING sql.txn.read_committed_isolation.enabled = true;
BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED;
SELECT 1;
CREATE TABLE a (a INT PRIMARY KEY);
ROLLBACK;

In CRDB this fails with explicit transaction involving a schema change needs to be SERIALIZABLE.

Jira issue: CRDB-33677

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0