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

SQLite do actually support savepoints #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romuald
Copy link

@romuald romuald commented Feb 17, 2025

Simply remove it from the unavailable list (that is now empty)

Tested on a local instance and it seems to work out of the box

Simply remove it from the unavailable list (that is now empty)
@jvanasco
Copy link
Contributor

IIRC, there has been some amount of SAVEPOINT support since 2009 but it had been pretty buggy and limited for quite some time. I believe the more recent versions can handle it well.

SqlAlchemy currently states (sqlite version):
:

Supported version | 3.12+
Best effort | 3.7.16+

There are outstanding issues about how savepoints work due to the pysqlite driver; a warning like this has been in SqlAlchemy for many years (and still is):

SQLite’s transactional scope is impacted by unresolved issues in the pysqlite driver, which defers BEGIN statements to a greater degree than is often feasible. See the section Serializable isolation / Savepoints / Transactional DDL or Serializable isolation / Savepoints / Transactional DDL (asyncio version) for techniques to work around this behavior

Theoretically it works, in practice it is often more complex - and utilizing it requires deploying workarounds.

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

Successfully merging this pull request may close these issues.

2 participants