Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: testing & clarification on special restart savepoint #6966

Closed
jseldess opened this issue Mar 24, 2020 · 2 comments
Closed

sql: testing & clarification on special restart savepoint #6966

jseldess opened this issue Mar 24, 2020 · 2 comments
Assignees
Milestone

Comments

@jseldess
Copy link
Contributor

PR: cockroachdb/cockroach#46194

From release notes:

  • CockroachDB still considers the name cockroach_restart special in SAVEPOINTs. A savepoint defined with the name cockroach_restart is a "restart savepoint" and has different semantics than standard savepoints:

    1. Restart savepoints must be opened immediately when the transaction starts. Opening a restart savepoint after other statements have been executed is not allowed. In contrast, standard savepoints can be opened after other statements have already been executed.
    2. After a successful RELEASE, a restart savepoint does not allow further use of the transaction. COMMIT must immediately follow the RELEASE.
    3. Restart savepoints cannot be nested. Issuing SAVEPOINT cockroach_restart two times in a row only creates a single savepoint marker. This can be seen with SHOW SAVEPOINT STATUS. Issuing SAVEPOINT cockroach_restart after ROLLBACK TO SAVEPOINT cockroach_restart reuses the marker instead of creating a new one. In contrast, two SAVEPOINT statements with a standard savepoint name, or a SAVEPOINT statement immediately after a ROLLBACK, create two distinct savepoint markers.

    Note: The session variable force_savepoint_restart still works and causes every savepoint name to become equivalent to cockroach_restart with the special semantics described above. [#46194][#46194]

@awoods187
Copy link
Contributor

@rmloveland
Copy link
Contributor

Closing as a dupe since the information in this release note is covered in the PR for #5953

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants