Transactions And Concurrency
Transactions and Concurrency
ACID, isolation levels, MVCC, and the locks that determine what happens when multiple transactions touch the same data.
Suggest an editTransactions and Concurrency
A transaction is a group of statements that succeed or fail together. Concurrency is what happens when more than one transaction runs at the same time. The intersection — what guarantees you get, what anomalies you don't — is one of the most consequential and least-understood areas of SQL.
Place in the curriculum
- Prerequisites: Data Manipulation for
BEGIN/COMMIT/ROLLBACK. Some familiarity with Indexes helps for the locking discussion.
Chapters
- ACID and Transactions — Atomicity, Consistency, Isolation, Durability. What each means in practice.
- Isolation Levels — the four standard levels, the anomalies they prevent, snapshot vs serializable.
- MVCC and Locking — Postgres's MVCC mental model, row vs table locks, deadlocks, advisory locks.
Mark as read