Part 2 of 5 · 1 min read
Multiple versions instead of one
A write creates a new version rather than overwriting the old one, so old versions remain available.
Think of a document system that keeps every past saved version, each tagged with when it was saved, instead of overwriting a file on every save. An old version remains readable even after a newer save has happened.
In plain words: under multiversion concurrency control, or MVCC, a write does not overwrite a row's existing data in place. Instead, it creates a new version of the row, tagged with information about which transaction created it, while the old version remains in storage, still readable by transactions that started before the new version was created. This is a direct departure from the single-version model locking and timestamp ordering both assume, where a write directly changes the one value every transaction sees.
A worked example. Updating a row's price under MVCC creates a new version of that row holding the new price, tagged with the updating transaction's identity, while the old version, holding the previous price, remains in storage and visible to transactions that began before the update.
The key lines. No new SQL; version creation on write is internal to how an MVCC-based storage engine executes an ordinary UPDATE.
Multiversion concurrency control (MVCC)
Multiversion concurrency control, or MVCC, has a write create a new version of a row rather than overwriting it in place, keeping old versions available for transactions that started before the new version existed.
Example: a document system keeping every past saved version instead of overwriting on each save mirrors MVCC's multiple row versions.