Did digging into the source, in_transaction wrapper eventually resolved to a clojure function called open-app-transaction!
Inside it, it uses JDBC (the java/JVM alternative to ODBC) to call the basic PostgreSQL isolation levels.
This means that:
- Normal interactions with an anvil
roware treated at Read Committed Isolation Level -
@anvil.tables.in_transaction(relaxed=True)interactions are set to Repeatable Read Isolation Level - The full
@anvil.tables.in_transactionis set to the PostgreSQL version of Serializable Isolation Level
The explanation of transaction isolation itself along with who what and how locks are handled (by row / rows or by table, how it handles deadlocks etc) can be found at the top of the docs found on postgresql.org
