A property of transaction histories
Serializability requires a concurrent transaction outcome to be equivalent to some legal serial execution of those transactions. It does not require the implementation to run only one transaction at a time. A database can exploit concurrency while coordinating or rejecting histories that cannot be explained sequentially. The transaction boundary is crucial: the property applies to the reads and writes grouped within each transaction, not automatically to an application workflow split across several independent commits. Begin with that boundary before assessing whether the database guarantee protects the intended invariant.
A write-skew example
Consider two on-call doctors, A and B, with an invariant that at least one must remain on call. Each transaction reads that the other doctor is available and then takes its own doctor off call. If both read the earlier state and update separate rows, the outcome can leave nobody on call. In a serial execution, the second transaction would see the first change and would not make that choice. The example shows why individually consistent snapshots and nonconflicting row writes can still fail to preserve a larger application invariant.
Retries are part of using the guarantee
Serializable implementations can use locking or conflict detection, among other techniques. PostgreSQL can abort a transaction with a serialization failure when allowing the competing history would violate the guarantee. The application should retry the whole transaction, including the reads that informed its decision, rather than repeating only the final UPDATE. Work performed outside the database transaction needs separate treatment. Sending a message or initiating a payment is not undone merely because the database rolls back, so retries must not accidentally duplicate those external effects.
Distinguish serializability from real-time guarantees
Serializability requires an admissible serial ordering, but the general definition does not additionally impose every real-time precedence constraint. Stronger terms such as strict serializability include a real-time requirement. Do not substitute linearizability of individual objects for a complete transaction guarantee without examining the boundaries. Nor can a stronger isolation level invent an application check that the transaction never performs. State the business invariant, include the necessary observations and updates, and then evaluate both the implementation guarantee and the operational cost of conflicts and retries.
Explain write skew with a dependency cycle
In the on-call example, T1 reads B as on call before T2 removes B. Preserving T1’s observation requires placing T1 before T2 in the corresponding serial explanation. T2 reads A as on call before T1 removes A, which requires the opposite order. No serial ordering can satisfy both requirements. The cycle explains why writing distinct rows is not sufficient for the application invariant. Keep this semantic argument separate from claiming that every conflict cycle in an arbitrary schedule disproves every form of view serializability. Here the specific reads and decisions directly exclude both possible serial orders. Reattempting a rejected transaction must reevaluate those observations, rather than reuse the old decision.