C H A P T E R 1 6
R
e
c
o
v
e
r
y
E
x
e
r
c
i
s
e
s
16.1 What information do undo log records contain, and what are they used for?
. .
.3
16.2 (Recovery)
a. Copying the page table in shadow paging can be quite expensive for very
large databases. Suggest an implementation of page tables that can reduce
16.3 (Aries)
a. If at the beginning of the analysis pass, a page is not in the checkpoint dirty
page table, will we need to apply any redo records to it? Why?
. .
.2
b. What is RecLSN, and how is it used to minimize unnecessary redos?
. .
.2
c. What problem could arise if there is
insufficient
log space during recovery?
How does Aries prevent this from happening?
. .
.1 + 1
43
44 Chapter 16 Recovery
16.4 The Oracle database system uses undo log records to provide a snapshot view
of the database to read-only transactions. The snapshot view reflects updates
of all transactions that had committed when the read-only transaction started;
16.5 Consider “dirty” pages in the buffer (i.e., each page that has some updates that
are not yet reflected on disk) Suppose you maintain a table that gives the log
16.6 a. Normally an action such as an
insertion
/
deletion
/
update
of a relation
also updates all indices on the relation. Suppose, index maintenance is
deferred, that is, it is performed only at the end of the transaction. What
problems can this cause for a transaction that involves multiple steps.
16.7 If you wanted high availability (i.e., the system should be up for as much time
as possible), would you use 2-very safe or 2-safe replication? Why?
. .
.2
16.8 Consider a hot-spare system, where there is a primary computer and a backup
computer. Log records generated at the primary are sent over the network to
the backup computer, where they can be used to keep a copy of the database in
sync with the primary. If the primary computer fails, the backup starts process
ing transactions. There are three logging techniques in such an environment:
. . .10
Exercises
45
a. Briefly outline how you could use the system log generated by the
ad
vanced recovery algorithm to keep it synchronized with the primary
copy.
. .
.2
b. Describe what happens on transaction abort.
. .
.1