Skip to content
uencoder

Undo Log

The undo log records before-images of modifications, used for transaction rollback and MVCC reads of old versions, guaranteeing atomicity and isolation.

Purpose

To understand the implementation of transaction rollback and multi-version reads, and analyze rollback performance.

Mechanism

Before modifying a row, write the undo log (old value). Rollback restores old values following the undo log. In MVCC, the undo chain provides historical versions for snapshot reads. PostgreSQL uses rollback segments (old) or undo logs (new).

Use cases

  • Transaction rollback design
  • MVCC version chains
  • Atomicity implementation

Related tools

References