-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: support rolling back nested transactions containing schema changes #10735
Description
CockroachDB 20.1 is introducing support for nested transactions via postgres' (and SQL standard) savepoint protocol. SAVEPOINT, RELEASE SAVEPOINT, COMMIT SAVEPOINT.
However as of 20.1, a (nested) transaction containing schema changes—or any type of DDL statement, really—cannot be rewound. This is because the logic needed to invalidate cached schema elements in the transaction has not been implemented yet.
To advertise compatibility with PostgreSQL to a level that satisfies most uses in client apps, this gap remains to be closed.
Note: the discussion starting in Nov 2016 up to and including February 2020 was about the initial design of nested transactions in CockroachDB. Discussion from March 2020 onward is about rolling back over DDL statements.
Jira issue: CRDB-6134
Epic CRDB-104