ACID Properties
The four properties
Property | Guarantee | How PostgreSQL implements it |
|---|---|---|
Atomicity | A transaction's statements either all take effect, or none do | Uncommitted changes are tracked and discarded on |
Consistency | A transaction can only move the database from one valid state to another — constraints, foreign keys, and rules are never violated | Enforced via constraints ( |
Isolation | Concurrent transactions don't see each other's uncommitted, in-progress changes | Implemented through MVCC (Multi-Version Concurrency Control) and configurable isolation levels |
Durability | Once a transaction is committed, it survives a crash, power loss, or restart | Achieved via WAL (Write-Ahead Logging) — changes are flushed to a durable log before the commit is acknowledged |
Why ACID matters
Without these guarantees, ordinary operations become dangerous. Without atomicity, a crash mid-transfer could deduct money from one account without ever crediting another. Without consistency, bad data could silently violate the rules your application depends on. Without isolation, one transaction could read another's half-finished work and act on numbers that were never actually true. Without durability, a "successful" commit could simply vanish the moment the server restarts. ACID is what lets application code assume the database will behave sanely, rather than having to defensively work around it.
Atomicity — all-or-nothing transactions.
Consistency — constraints and rules are never violated.
Isolation — concurrent transactions don't see each other's uncommitted work.
Durability — committed data survives a crash, backed by Write-Ahead Logging (WAL).
PostgreSQL's strong ACID compliance is one of its core, long-standing strengths.