Information Technology Reference
In-Depth Information
Chapter 4
Transaction Rollback and Restart Recovery
During normal processing, total or partial rollbacks occur when transactions
themselves request such actions. In the event of a system crash or startup, restart
recovery is performed before normal transaction processing can be resumed.
This includes restoring the database state that existed at the time of the crash
or shutdown from the disk version of the database and from the log records
saved on the log disk, followed by the abort and rollback of all forward-rolling
transactions and running the rollback of all backward-rolling transactions into
completion.
In this chapter we show how the physiological redo-undo log records written
during normal transaction processing are used to redo update actions whose effects
are found missing from the disk version of the database and how the log records
are used to perform the undo actions of backward-rolling transactions in our key-
range transaction model. We also show how restart recovery can be speeded up
by periodically written checkpoint log records that include snapshots of the active-
transaction and modified-page tables.
The recovery algorithm to be presented is a slightly simplified version of the
ARIES algorithm for a centralized database system. This algorithm consists of four
phases, performed in the order shown: (1) the analysis pass for reconstructing the
active-transaction and modified-page tables, (2) the redo pass for restoring the state
of the database, (3) the undo pass for rolling back active transactions, and (4) the
taking of a checkpoint. One of the most notable points in this organization of restart
recovery is that the redo pass consists entirely of physically executed redo actions,
thus restoring the state of the physical database that existed when the last log record
saved on disk was written.
Search WWH ::




Custom Search