Why it matters

Every application designer runs into isolation level issues eventually. Understanding what your DB actually does (versus what SQL standard says) prevents surprising bugs.

Advertisement

The architecture

Read Uncommitted: allows dirty reads. Almost never used.

Read Committed: only committed data visible. Allows non-repeatable reads and phantoms.

Isolation level ladderRead Committedno dirty readsRepeatable Readno non-rep readsSerializablefull isolationSnapshot isolation is common Repeatable Read implementation; serializable snapshot isolation prevents write skew
Standard levels + real DBs.
Advertisement

How it works end to end

Repeatable Read: reads see consistent snapshot across the transaction. Prevents non-repeatable reads. Postgres implements via MVCC snapshot.

Serializable: transactions behave as if serial. Highest level; often expensive.

Snapshot isolation: strict Repeatable Read. Not fully serializable (write skew possible).

Serializable Snapshot Isolation (SSI): Postgres's SERIALIZABLE mode. Prevents write skew via runtime detection.