MVCC prevents current transactions from directly overwriting active data pages during UPDATE and DELETE operations by maintaining version snapshots:
- •PostgreSQL: Appends an entirely new version of the row (
tuple) onto an 8KB heap page, tagging it withxminandxmaxtransaction IDs. Older tuple versions become invisible to newly created transaction snapshots and are subsequently reclaimed by the asynchronous VACUUM worker. - •MySQL (InnoDB): Modifies the row in-place within the clustered index leaf, but writes previous row versions into dedicated Undo Tablespace rollback segments. Readers requiring point-in-time snapshots reconstruct historic row states dynamically using these undo log records, while background
Purge Threadsreclaim obsolete segments once no longer required.