Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

enable savepoint #472

Merged
merged 2 commits into from
Oct 9, 2023
Merged

enable savepoint #472

merged 2 commits into from
Oct 9, 2023

Conversation

MarinPostma
Copy link
Contributor

Enable SAVEPOINT statement, and categorize it as a read. Either there is an ongoing interactive transaction in which case this will be transfered to the primary, or it's part of a non-interactive transaction, and has the same type as the rest of the transaction (savepoint in a readonly txn is ok), or it's not part of any transaction and it'll error out.

@honzasp
Copy link
Contributor

honzasp commented Jun 13, 2023

I think that we need two three more things:

  1. A SAVEPOINT statement will start a transaction if it is not called in BEGIN block
  2. We also need to enable RELEASE statement.
  3. ROLLBACK TO SAVEPOINT also needs to be handled.

@CodingDoug
Copy link
Contributor

I think this should be coupled with savepoint(name), rollback(name), and release(name) methods in the Transaction object provided by the client SDKs. @honzasp

Was originally proposed here: https://docs.google.com/document/d/1fYvf-uYQEo38nRclyR3gNumHuR4eMJG7vLg6e8FmTAg/edit#heading=h.yfvhu8vw0lyv

@MarinPostma MarinPostma marked this pull request as draft October 5, 2023 07:33
@MarinPostma MarinPostma marked this pull request as ready for review October 5, 2023 10:01
@psarna psarna added this pull request to the merge queue Oct 9, 2023
Merged via the queue into main with commit 42eabee Oct 9, 2023
@psarna psarna deleted the enable-savepoints branch October 9, 2023 09:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants