Skip to main content
Definition Website Computer and Technology

Multi-Version Concurrency Control

Subject: Computer and Technology noun /ˌmʌl.tiˈvɜːr.ʒən kənˈkɜːr.ən.si kənˈtroʊl/ 1 definition

  1. Definition (noun)

    Entry #68 · Updated

    Multi-Version Concurrency Control (MVCC) is a database concurrency control technique that manages simultaneous access by maintaining multiple timestamped or transaction-tagged versions of each data item rather than overwriting records in place. When a transaction modifies a record, the storage engine preserves prior committed states—either as appended record versions or as undo-log deltas reclaimed later by garbage collection—allowing each transaction to read a consistent point-in-time snapshot without seeing uncommitted changes. By decoupling snapshot reads from in-flight modifications, MVCC ensures that readers never block writers and writers never block readers, while still relying on conflict detection, write locks, or serialization checks to coordinate concurrent updates to the same data.

    Common Forms

    • Snapshot Isolation (SI): Serves every transaction from a consistent point-in-time snapshot taken at its start without acquiring read locks, resolving write-write conflicts through first-committer-wins validation or row locks while remaining susceptible to anomalies such as write skew.

    • Serializable Snapshot Isolation (SSI): Extends snapshot isolation by tracking read-write anti-dependency edges across concurrent transactions (as in PostgreSQL's SERIALIZABLE mode), aborting transactions that form dangerous conflict cycles to guarantee strict serializability without read locks.

    • Multi-Version Timestamp Ordering (MVTO): Assigns each transaction a unique timestamp up front and tracks read and write timestamps on versions, serving reads from the latest version at or before the transaction's timestamp while aborting writes that would invalidate a younger transaction's completed read.

    • Multi-Version Two-Phase Locking (MV2PL): Pairs lock-free snapshot reads for read-only transactions with two-phase locks on current versions for modifying transactions, serializing concurrent updates while keeping read-only workloads non-blocking.

    Example

    In an e-commerce PostgreSQL database, an analytics transaction opens at 14:00:00 under snapshot 5021 to sum daily paid order revenue while a concurrent checkout worker (transaction 5024) updates order #88412 from pending to paid by writing a new tuple version. Because MVCC preserves the prior version visible to snapshot 5021, the report computes a consistent point-in-time total without waiting on row locks, and the checkout transaction commits without being blocked by the long-running read.