Information Technology Reference
In-Depth Information
log
active-transaction table
101:
T 1 ,B
102: T 1 ,D,p 1 ,x 1 ,v 1 , 101
103: begin-checkpoint
104: active-transaction-table, {
(
state
backward-rolling
forward-rolling
tr-id
Undo-Next-LSN
T 2
T 3
110
112
,
Undo-Next-LSN = 102)
105: modified-page-table
T 1 ,
forward-rolling
modified-page table
page-id
, {
( p 1 , Rec-LSN = 102)
106: end-checkpoint
107:
Rec-LSN
p 1
p 2
102
112
T 1 ,I,p 1 ,x 1 ,v 1 ,
102
108:
T 2 ,B
109:
T 1 ,C
database buffer
110:
T 2 ,D,p 1 ,x 1 ,v 1 ,
108
page
p 1
page
p 2
111:
T 3 ,B
...
Page-LSN=115
Page-LSN=117
112:
T 3 ,I,p 2 ,x 2 ,v 2 ,
111
(
x 2 ,v 2 )
113:
T 2 ,I,p 1 ,x 3 ,v 3 , 110
(
x 4 ,v 4 )
114:
T 2 ,A
1
115:
T 2 ,I
,p 1 ,x 3 ,
110
116:
T 4 ,B
117:
T 4 ,I,p 2 ,x 4 ,v 4 ,
116
118:
T 4 ,C
Fig. 4.5
Database state after the redo pass of ARIES recovery
116: No action.
117: Because R EC -LSN .p 2 / D 112 117,pagep 2 is fixed and write-
latched. As the page is no longer unmodified, its R EC -LSN is not updated. Because
P AGE -LSN .p 2 / D 112 < 117, the result of the action IŒx 4 ; v 4 is missing from the
page. The tuple .x 4 ; v 4 / is inserted into the page and P AGE -LSN .p 2 / 117.Pagep 2
is unfixed and unlatched.
118: No action.
The redo pass is now complete. In page p 2 there are the tuples .x 2 ; v 2 / and
.x 4 ; v 4 /, while tuples with keys x 1 and x 3 are missing from the database, as was
the case at the time of the crash (Fig. 4.5 ).
t
Theorem 4.6 The analysis pass followed by the redo pass brings the physical
database (and hence also the logical database) to the state that existed when the
most recent log record found on the log disk was written. The resulting database
state is action consistent, provided that each structure modification has been logged
with a single redo-only log record.
Search WWH ::




Custom Search