Next: Media Recovery
Up: No Title
Previous: Selective or Deferred
Impact of failures on CPU processing and I/O can be reduced by, optionally,
taking checkpoints during different stages of restart recovery processing.
Analysis Pass:
-
By taking a checkpoint at the end of analysis pass, we can save some work
if a failure were to occur during recovery.
-
The entries of the transaction table of this checkpoint will be the same as
those at the end of analysis pass.
-
The entries of the dirty_pages list of this checkpoint will be the same as
those at the end of analysis pass.
Redo Pass:
-
At the beginning of redo pass, the buffer manager (BM) is notified.
-
Hence whenever BM writes out a modified page to nonvolatile storage during
the redo pass, it will change the restart dirty_pages table entry for that
page by making the RecLSN be equal to the LSN of that log record such that
all log records upto that log record have been processed.
-
During the redo pass, the BM does not have to maintain its own dirty_pages
table as it does during normal processing.
-
The BM still has to keep track of what pages are currently in the buffers.
-
This allows checkpoints to be taken any time during the redo pass to reduce
the amount of log that would need to be redone if a failure were to occur
before the end of redo pass.
Undo Pass:
-
At the beginning of the undo pass, the restart dirty_pages table becomes
the buffer pool (BP) dirty_pages table.
-
At this point, the table is cleaned up by removing those entries for
which the corresponding pages are no longer in the buffers.
-
From then onward, the BP manager manipulates this table as it does during
normal processing-removing entries when pages are written to nonvolatile
storage and adding entries when pages are about to become dirty.
-
During the undo pass, the entries of the transaction table are modified
as during normal undo.
Next: Media Recovery
Up: No Title
Previous: Selective or Deferred
Vinay V
Mon Apr 12 18:36:08 IST 1999