isolation level

A setting that controls how much concurrent transactions can see of each other's changes and how they may interleave.

In more detail

From weaker to stronger, the standard levels are read uncommitted, read committed, repeatable read and serializable. Stronger levels prevent more anomalies but block or abort more transactions. PostgreSQL defaults to read committed; SQLite serialises writers, which makes its transactions serializable.

Example

In this course: Fakes and in-memory stand-ins rarely imitate isolation correctly, so behaviour that depends on it must be tested against the real engine. PostgreSQL defaults to read committed, while stricter levels such as serializable prevent more anomalies at a cost.

Related terms

Taught in

References