4

does it just get released on session.commit()? I couldn't find documentation on the release of the lock

Anis Jonischkeit
  • 914
  • 7
  • 15
  • 1
    This is not something inherent to SQLAlchemy, but the DB you're using (int this case Postgresql). Read https://www.postgresql.org/docs/current/static/sql-select.html#SQL-FOR-UPDATE-SHARE and https://www.postgresql.org/docs/9.1/static/explicit-locking.html. "Once acquired, a lock is normally held till end of transaction. But if a lock is acquired after establishing a savepoint, the lock is released immediately if the savepoint is rolled back to." – Ilja Everilä Jun 07 '17 at 06:12
  • yes, this does look like a duplicate, my bad. was looking for something sqlalchemy related – Anis Jonischkeit Jun 07 '17 at 06:17

0 Answers0