docs icon indicating copy to clipboard operation
docs copied to clipboard

PR #42063 - sql: new session variable `strict_ddl_atomicity`

Open cockroach-teamcity opened this issue 1 year ago • 3 comments

Exalate commented:

Related PR: https://github.com/cockroachdb/cockroach/pull/42063 Commit: https://github.com/cockroachdb/cockroach/commit/3de280109f4e1151ce5b72418e3c911f00b15fdc Epic: CRDB-28893 Fixes: CRDB-30617 Informs: CRDB-5394 CRDB-19226


Release note (sql change): a SQL client can now request strict atomicity for mixed DDL/DML transactions with the new session variable strict_ddl_atomicity, which defaults to false. When this variable is set to true, CockroachDB will refuse to accept processing those specific DDL statements inside BEGIN...COMMIT for which it cannot guarantee atomic processing (other DDL statements are still allowed).

Note that schema changes implicit in certain operations (e.g. IMPORT) are not protected via the new mechanism and can still fail with XXA00 errors.

Jira Issue: DOC-8628

cockroach-teamcity avatar Aug 23 '23 05:08 cockroach-teamcity

@rmloveland , could you please add / link an info which statements are DDL and which DML? What do CREATE ROLE, CREATE USER and GRANT ... count as? Thanks.

OndraZizka avatar Mar 11 '24 18:03 OndraZizka

hi @OndraZizka - DDL is talked about a little in our schema change docs - we don't list every statement that is DDL, but we link to the DDL wikipedia page

re: your specific question, I think CREATE ROLE, CREATE USER, and GRANT are all DDL statements - @rafiss is that correct?

rmloveland avatar Mar 13 '24 14:03 rmloveland

I think CREATE ROLE, CREATE USER, and GRANT are all DDL statements - @rafiss is that correct?

that's correct

rafiss avatar Mar 13 '24 21:03 rafiss