Information Technology Reference
In-Depth Information
107 (forward-rolling update by T
1
on page p
1
): Set
U
NDO
-N
EXT
-LSN
.T
1
/
107 in the active-transaction table. The modified-page table need not be updated,
because page p
1
is already recorded there.
108 (begin of T
2
): The record .T
2
; forward-rolling;
U
NDO
-N
EXT
-LSN
D
108/ is
inserted into the active-transaction table.
109 (commit of T
1
): The record for T
1
is deleted from the active-transaction table.
The contents of the table are now
f
.T
2
; forward-rolling;
U
NDO
-N
EXT
-LSN
D
108/
g
.
110 (update by T
2
on page p
1
): Set
U
NDO
-N
EXT
-LSN
.T
2
/
110. The modified-
page table is not updated.
111 (begin of T
3
): The record .T
3
; forward-rolling;
U
NDO
-N
EXT
-LSN
D
111/ is
inserted into the active-transaction table.
112 (update by T
3
on page p
2
): Set
U
NDO
-N
EXT
-LSN
.T
3
/
112 and insert the
record .p
2
;
R
EC
-LSN
D
112/ into the modified-page table.
113 (update by T
2
on page p
1
): Set
U
NDO
-N
EXT
-LSN
.T
2
/
113. The modified-
page table is not updated.
114 (abort of T
2
): Change the state of T
2
to “backward-rolling” in the active-
transaction table.
115 (undoing of an update by T
2
on p
1
): Set
U
NDO
-N
EXT
-LSN
.T
2
/
110.The
modified-page table is not updated.
116 (begin of T
4
): The record .T
4
; forward-rolling;
U
NDO
-N
EXT
-LSN
D
116/ is
inserted into the active-transaction table.
117 (update by T
4
on page p
2
): Set
U
NDO
-N
EXT
-LSN
.T
4
/
117. The modified-
page table is not updated.
118 (commit of T
4
): The record for T
4
is deleted from the active-transaction table.
The log has now been scanned to the end. The contents of the reconstructed
active-transaction table are now
f
.T
2
; backward-rolling;
U
NDO
-N
EXT
-LSN
D
110/,
.T
3
; forward-rolling;
U
NDO
-N
EXT
-LSN
D
112/
g
,
and the contents of the reconstructed modified-page table are:
f
.p
1
;
R
EC
-LSN
D
102/; .p
2
;
R
EC
-LSN=112
/
g
.
The analysis pass ends with setting
R
EDO
-LSN
min
f
102; 112
gD
102
as the starting point of the redo pass.
t
Theorem 4.4
The active-transaction table reconstructed in the analysis pass has
the contents that existed at the time when the last log record found on the log disk
was written. The modified-page table reconstructed in the analysis pass contains the
page-id of every page
p
that resided in the buffer as modified at the time when the
last log record found on the log disk was written, with a
R
EC
-LSN
value satisfying
the following conditions: