4-34 IBM Informix OnLine Database Server Administrator’s Guide
Synchronize tbtape and tbinit Activities
The answer is thattbtape and tbinit synchronize their activities at the
beginningof the archive and continue to work in concert until the end of the
archive. The following paragraphs describe the consequences of this
cooperation.
Archive Disk Pages
The first task is to prevent any specific disk page from being modified until
tbtape has had a chance to archive that page in its archive-begin state. The
tbtape process neatly accomplishes this task without interrupting
processing.
During an archive,tbtape periodically scans the physical log looking for
“before-images”that contain timestamps that are less than the begin-archive
checkpointtimestamp. Each “before-image” page that meets this criterion is
copied to the archive tape.
OnLine cannot rely on scanning to obtain every required “before-image.”
The tbinit process must be blocked from flushing the physical log(by
completing a checkpoint) untiltbtape can verify that it has copied all
required “before-images.” This is accomplished by ensuring that thetbtape
archive processing remains in critical-section code throughout the
procedure, effectively blocking a checkpoint from occurring. (Refer to
page 2-28 for more details about criticalsections.)
When the need arises to flush the physical log,tbinit notifies tbtape. The
tbtape process scans the physical log to copy any required “before-images”
to the archive tape. (Periodic scanning prevents this final check and copy
from unduly prolonging the checkpoint.)
Copyingdone, tbtape temporarily exits from its critical section long enough
fortbinit to complete its checkpoint. When the checkpoint is complete,
tbtape reenters the critical section, again blockingtbinit from executing a
checkpoint.