1. Multi-Version Concurrency Control


The DBMS maintains multiple physical versions of a single logical object in the database

Use timestamps to determine visibility.

Writers do not block readers.

Readers do not block writers.

Read-only txns can read a consistent snapshot without acquiring locks.

Easily support time-travel queries.

There are four important MVCC design decisions:

  1. Concurrency Control Protocol
  2. Version Storage
  3. Garbage Collection
  4. Index Management

Untitled

2. Concurrency Control Protocol


Approach #1: Timestamp Ordering

Assign txns timestamps that determine serial order.

Approach #2: Optimistic Concurrency Control

Three-phase protocol from last class.