serializable
The strictest isolation level, which guarantees the result is the same as if transactions had run one after another.
In more detail
The database achieves it by blocking, or by aborting a transaction that would break the guarantee, so the application must be ready to retry. Choose it when several reads and writes together form one decision that cannot tolerate interference.
Related terms
- isolation level — A setting that controls how much concurrent transactions can see of each other's changes and how they may interleave.
- repeatable read — An isolation level where a transaction keeps seeing the same snapshot of the data for its whole life.
- lost update — A concurrency bug where two sessions read the same value, both write a result based on it, and the later write silently erases the earlier one.
Taught in
- Isolation Levels And The Lost Update — PostgreSQL, Indexing & Relational Data Modeling
- Where PostgreSQL Differs From SQLite — PostgreSQL, Indexing & Relational Data Modeling