Serializability explained in plain terms means understanding the gold standard of database correctness: a set of transactions that run at the same time must produce the same result as if they had run one after another. The central question is how a database can let many transactions work concurrently without ever producing a result that no serial order could give, and the answer is serializability, a rule about the final state, not about how it was reached.
Serializability is the strongest isolation guarantee a database can offer. A concurrent execution is serializable if there is some order in which the transactions could have run one by one, and produced exactly the same result, including the same answers to every read and the same final state of every row.
The idea is simple: concurrency is an optimisation, not a change in meaning, so a user should never be able to tell, from the results, that transactions ran at the same time. If the result could not have come from any serial order, the execution is wrong, however fast it was. This article explains what serializability is, how it works, and where it is used.
Key takeaways
- Serializability means concurrent transactions behave as if run one by one.
- It is the strongest isolation guarantee a database can offer.
- It forbids every anomaly, including write skew and phantoms.
- Databases enforce it with locking, validation, or precise tracking.
- It costs concurrency, so it is used only where correctness is critical.
What serializability is
Serializability is defined by the result, not by the mechanism. Two transactions that run concurrently are serializable if their interleaved reads and writes are equivalent to running one transaction to completion and then the other. The actual order the database chooses does not matter, as long as some serial order explains everything that happened.
The classic test is the conflict graph. Each transaction is a node, and an edge is drawn from one transaction to another when the first writes something the second reads, or when the two write the same item in a particular order. If the graph has no cycle, the execution is serializable; if it has a cycle, two transactions depended on each other in a way that no serial order can explain, and the execution is wrong.
Serializability forbids every anomaly that weaker levels allow: dirty reads, lost updates, non-repeatable reads, phantom reads, and write skew. A transaction running under serializable isolation can reason about the data as if it were alone in the system, which is what makes it safe for the most critical work. Our guide to ACID explains the isolation property that serializability fulfils completely, and our guide to distributed systems explains why the same guarantee is harder to provide across many machines.
How serializability works
The oldest enforcement method is two-phase locking. A transaction takes a lock on every row it reads or writes, and holds all its locks until it commits, releasing them only in a second phase after it has stopped acquiring new ones. Because two transactions cannot hold conflicting locks on the same row at the same time, their operations are effectively ordered, and the result is always serializable.
Two-phase locking has a cost: deadlocks. If one transaction holds a lock the other wants, and the other holds a lock the first wants, neither can proceed, and the database must detect the cycle and abort one of them. Locking also blocks readers, since a read lock stops a writer, which is why systems that need fast reads often look for another method.
Optimistic methods enforce serializability by checking at commit time. A transaction runs freely on private copies of the data, and before it commits, the database checks whether any other transaction changed the data it used. If the check passes, the commit proceeds; if it fails, the transaction is aborted and retried. This is the approach used by serializable snapshot isolation, which tracks the read and write sets precisely enough to detect cycles.
Serializable snapshot isolation, known as SSI, is the method used by PostgreSQL. It runs transactions under snapshot isolation, but watches for patterns that indicate a cycle in the conflict graph, such as two transactions that read data the other wrote. When it detects a dangerous pattern, it aborts one of the transactions, which keeps the execution serializable without locking readers at all.
Timestamp ordering is a third method. Each transaction is given a timestamp when it starts, and the database orders all operations by that timestamp, refusing any operation that would arrive out of order. A read that comes too late, after a newer write to the same row, is rejected, and the transaction must retry, which guarantees that the final order matches the timestamp order.

Comparing serializability with other isolation levels
Serializability is one of several isolation levels, and each was built with a different emphasis. Snapshot isolation gives each transaction a frozen view but allows write skew, while read committed shows the latest committed data with few guarantees, and each level trades correctness for speed in a different way.
The table below sets out the main contrasts between the leading approaches.
| Aspect | Serializability | Snapshot isolation | Read committed |
|---|---|---|---|
| Guarantee | As if run one by one | Frozen snapshot view | No dirty reads only |
| Anomalies allowed | None | Write skew | Several |
| Readers block writers | With locking, yes | Never | Briefly |
| Concurrency | Lowest | High | Highest |
| Best for | Money and stock | General workloads | Simple reporting |
The practical result is that serializability is the right choice when a wrong result costs real money, snapshot isolation suits most general work, and read committed is enough for simple reads where consistency matters least.
Where serializability is used
Banking systems use serializability for transfers and balances. A transfer that debits one account and credits another must never be interleaved with another transfer in a way that loses money or double-spends it, and serializable isolation is what guarantees that the books always balance, whatever the order of concurrent transactions.
Inventory systems use serializability to prevent overselling. When two customers buy the last item at the same time, only one of them can succeed, and serializable isolation ensures the second transaction sees the stock as zero rather than as one, so the shop never sells an item it does not have.
Booking systems use serializability for seats, rooms, and appointments. A seat can only be sold once, and a serializable transaction that checks availability and then books is guaranteed to see the true state, so two customers can never be given the same seat by two transactions that ran at the same moment.
PostgreSQL offers true serializability through SSI, and it is used by applications that need the guarantee without giving up snapshot reads. The database detects dangerous patterns and aborts one transaction, which the application retries, so the cost is paid only when a real conflict threatens correctness.
Distributed databases that offer serializability use it for their most critical operations. A globally distributed store may offer weaker guarantees by default, but provide serializable transactions for the operations that need them, such as schema changes and financial records, accepting the extra coordination those operations require.
Strengths and limits
The greatest strength of serializability is that it removes all doubt. A programmer can reason about a transaction as if it ran alone, without thinking about what other transactions might be doing at the same time, and every anomaly that weaker levels allow is simply impossible.
It is also a strength that serializability is defined by the result. The database is free to use any mechanism, locking, validation, or timestamp ordering, as long as the outcome is equivalent to some serial order, which lets each system choose the method that fits its design.
The limits are real, though. Serializability reduces concurrency, because transactions must wait for locks or be aborted and retried, and under heavy contention the abort rate can climb until the system spends more time retrying than doing useful work. For data where a rare anomaly is harmless, that cost is wasted.
Serializability checklist
- Use serializability for money, stock, bookings, and other invariants.
- Expect aborts and deadlocks; always retry serializable transactions.
- Keep serializable transactions short to reduce contention.
- Test under concurrent load, not just one transaction at a time.
- Check whether your database offers true serializability or only snapshot isolation.
- Monitor the abort rate; a high rate means the workload does not fit.
- Use weaker levels for reads where a stale answer is harmless.
- Document which operations run at which isolation level.
- Never assume a level labelled serializable is truly serializable.
Frequently asked questions
What is serializability in simple terms?
It is a guarantee that transactions running at the same time produce the same result as if they had run one after another, so that concurrency never changes what the data means.
What is the difference between serializability and serial execution?
Serial execution runs transactions literally one after another, while serializability only requires that the result is the same as some serial order. The database may interleave operations freely, as long as the outcome could have come from a serial run.
What is a conflict graph?
It is a graph in which each transaction is a node and each dependency between transactions is an edge. If the graph has no cycle, the execution is serializable; a cycle means no serial order can explain what happened.
What is serializable snapshot isolation?
It is a method, used by PostgreSQL, that runs transactions under snapshot isolation but watches for patterns that would create a cycle in the conflict graph, aborting one transaction when such a pattern appears.
Why is serializability expensive?
Because it must prevent every anomaly, which means transactions wait for locks or are aborted and retried. Under heavy contention, the waiting and retrying can dominate, and throughput falls.
When should I not use serializability?
When the data tolerates rare anomalies, such as a social feed, a catalogue, or an analytics dashboard. In those cases a weaker level is faster and cheaper, and the occasional inconsistency is harmless.
The bottom line
Serializability explained in one line is this: concurrent transactions must behave exactly as if they had run one by one.
It is the strongest promise a database can make, and the right one whenever a wrong result would cost real money or real trust.
This article is general information about how serializability works, not advice about choosing an isolation level for a particular system.







