IBM 000-8697 User Manual

Page of 702
2-72
IBM Informix OnLine Database Server Administrator’s Guide
What Happens During a Checkpoint
What Happens During a Checkpoint
The checkpoint procedure is prompted by any one of four conditions (refer
to
). This description begins when the checkpoint-requested flag is set
by an OnLine user process after one of the four conditions is found to exist.
The checkpoint-requested flag wakes the tbinit daemon if it is not already
awake. Once this flag is set, OnLine user processes are prevented from
entering portions of code that are considered critical sections. (Refer to
.) User processes that are within critical sections of code are
permitted to continue processing.
After all processes have exited from critical sections, tbinit resets the shared-
memory pointer from the current physical log buffer to the other buffer and
flushes the buffer. After the buffer is flushed, tbinit updates the shared-
memory structure that contains a timestamp indicating the most-recent point
at which the physical log buffer was flushed.
Next, tbinit or tbpgcl (page-cleaner) daemons flush all modified pages in the
shared-memory pool. This flushing is performed as a chunk write. (Refer to
After the modified pages have been written to disk, tbinit writes a checkpoint-
complete 
record in the logical log buffer. After this record is written, the logical
log buffer is flushed to disk.
The tbinit daemon next begins writing all configuration and archive infor-
mation to the appropriate reserved page, whether or not changes have
occurred since the last checkpoint. (Refer to
 for more information
about the reserved pages.)
When dbspaces, primary chunks, or mirror chunks are added or dropped
from OnLine, the changes are recorded in descriptor tables in shared
memory. If changes have occurred since the last checkpoint, tbinit writes the
descriptor tables from shared memory to the appropriate reserved page in
the root dbspace. Otherwise, tbinit ignores the reserved pages that describe
the dbspaces, primary chunks, and mirror chunks. The tbinit daemon writes
all checkpoint statistics to the appropriate reserved page in the root dbspace.
Next, tbinit looks for logical log files that can be freed (status
U-L
) and frees
them. (Refer to
.) Last, the checkpoint-complete record is written to
the OnLine message log.