14. Understanding Multiversion Concurrency Control : How MVCC Works
 
Share this page                  
How MVCC Works
Ingres provides consistent data by reconstructing older versions of data dynamically using log records. Ingres follows this process:
1. Reads the desired data page and makes a copy of the page
2. Locates log records that correspond to uncommitted changes made to the page
3. Uses log records to "undo" uncommitted updates made to the data page (that is, rolls back to a consistent snapshot in the past)
4. Returns a "snapshot too old" error E_DM0028_UNABLE_TO_MAKE_CONSISTENT if the undo information required for a consistent read is not available
The point in time at which the snapshot of the data is taken is defined by the isolation level. For example:
Isolation Level
Point in Time for the Snapshot
Serializable
The start of the transaction, which provides transaction level read consistency
Read Committed
The start of the query, which provides statement level read consistency
Although journaling may be necessary to return an old snapshot of the data, it is not strictly needed for newer snapshots, so journaling is not a requirement.