~/ learn/ comp-378/ cards/ Concurrency Control II: Versioning (Optimistic)
1 of 3

How does versioning (optimistic concurrency control) work?

How does versioning (optimistic concurrency control) work?

Answer

Each transaction sees a snapshot of the database as of its start; a write creates a new record version rather than overwriting; at commit the DBMS checks for a conflicting committed change and either merges the new version or rolls back and restarts the transaction. No locking is used.

PostgreSQL and Oracle implement this as MVCC; readers and writers no longer block each other.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/a94947f0-d132-45dc-b5b3-be4502240028/flashcard utf-8 LF