~/ 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/b24a626a-cba2-4a21-93ad-c0de158f94f2/flashcard utf-8 LF