Transaction Isolation

Created at: 2024-11-14

Postgres only implements three out of the four transaction isolation levels from the SQL standard. PostgreSQL's Read Uncommitted mode behaves like Read Committed. Note that read committed is the default.

The different levels mean to restrict the existence of the following issues:

A summary table is provided:

Isolation Level Dirty Read Nonrepeatable Read Phantom Read Serialization Anomaly


Read uncommitted Allowed but not in PG Possible Possible Read committed Not possible Possible Possible Possible Repeatable read Not possible Not possible Allowed but not in PG Serializable Not possible Not possible Not possible Not possible

Important note

Some PostgreSQL data types and functions have special rules regarding transactional behavior. In particular, changes made to a sequence (and therefore the counter of a column declared using serial) are immediately visible to all other transactions and are not rolled back if the transaction that made the changes aborts. 1.