Information Technology Reference
In-Depth Information
thread are transferred to that process the corrupted pages are purged from the buffer
without flushing them onto disk and then fixed again, thus bringing the disk versions
of the pages into the buffer.
The R EDO -LSN is set to the minimum of the R EC -LSN s of the corrupted pages,
and the log (including the log records on disk and in the log buffer) is scanned
from the R EDO -LSN to the saved LSN , redoing on the write-latched pages all
the missing updates with LSN s greater than or equal to R EDO -LSN and less than
or equal to the saved LSN . In this way, we restore all the updates on the cor-
rupted pages logged before the failure caused the corruption of the pages in the
buffer.
After the selective redo pass, transaction T is aborted and rolled back in the
usual way by the recovery process, as if T itself had performed the SQL rollback
statement.
4.11
Recovering Structure Modifications
Consider a structure modification that has been logged with a single redo-only log
record of the form
n Wh S; p 1 ;:::;p k ;V 1 ;:::;V l i ,
where S is the name of the structure modification, p 1 ;:::;p k are the page-ids of
the pages updated in the modification, and V 1 ;:::;V l are other arguments needed
to represent the effects of the modification on the affected pages, such as sets of
records moved from a page to another. We call such a modification a redo-only
structure modification .
Examples of log records for redo-only structure modifications include
n: h allocate-page-for-heap ;s;f;p;q i
representing the allocation of a new page q and linking it into a chain of pages, and
n: h page-split ;p;q;x;q 0 ;s;V;h i
representing a split of a full B-tree page q of height h,wherep, q, q 0 and s are
page-ids, the set V contains the records moved from page q to its new sibling page
q 0 , x is the minimum key of the those records, .x; q 0 / is the child-router record
inserted into the parent page p, and page s is the space-map page used to allocate the
page q 0 .
In the analysis pass (Algorithms 4.12 and 4.13 ), the log records for structure
modifications are processed by the call analyze-smo .r/ (Algorithm 4.17 ).
Search WWH ::




Custom Search