Home | Previous Page | Next Page   Logging and Log Administration > Physical Logging, Checkpoints, and Fast Recovery > Checkpoints >

Sequence of Events in a Checkpoint

The following section outlines the main events that occur from the time a checkpoint is requested. This section also notes the differences between full and fuzzy checkpoints:

  1. The database server prevents user threads from entering critical sections.
  2. The logical-log buffer is flushed to the current logical-log file on disk.
  3. The database server flushes the physical-log buffer to the physical log.
  4. In a fuzzy checkpoint, the database server flushes modified pages for nonfuzzy operations to disk.

    In a full checkpoint, the database server flushes all modified pages to disk.

  5. The database server writes a checkpoint record to the logical-log buffer.
  6. The physical log is logically emptied. (Current entries can be overwritten).

User Threads Cannot Enter a Critical Section

This step is the same for both fuzzy and full checkpoints. After a checkpoint is requested, user threads are prevented from entering portions of code that are considered critical sections. User threads that are within critical sections of code are permitted to continue processing to the end of the critical sections.

Logical-Log Buffer Is Flushed to the Logical-Log File on Disk

This step is the same for both fuzzy and full checkpoints. Next, the logical-log buffer is flushed to the logical-log file on disk.

The Physical-Log Buffer is Flushed to the Physical Log on Disk

For both fuzzy and full checkpoints, the database server flushes the physical-log buffer to the physical log on disk. For full checkpoints, the physical-log buffer contains all modified pages whereas for fuzzy checkpoints, the physical-log buffer holds pages that fuzzy operations modified. The time stamp of the physical-log flush is stored in shared memory.

Modified Pages in the Buffer Pool Are Flushed to Disk

In a fuzzy checkpoint, the database server flushes modified pages for nonfuzzy operations in the buffer pool to disk. The database server flushes modified pages for fuzzy operations (inserts, deletes, updates) to disk. Figure 62 shows how the database server writes only the nonfuzzy pages to disk. The shaded squares, marked F, represent the fuzzy pages.

Figure 62. Selectively Writing Modified Pages from Shared Memory to Disk
begin figure description - This figure shows arrows pointing from nonfuzzy pages to a disk. - end figure description

In a full checkpoint, the database server flushes all modified pages in the shared-memory buffer pool to disk.

Checkpoint Thread Writes Checkpoint Record

This step is the same for both fuzzy and full checkpoints. A checkpoint-complete record is written to the logical-log buffer after the modified pages have been written to disk.

In a fuzzy checkpoint, a dirty-pages table (DPT) record is written to the logical-log buffer. For more information, see the chapter on logical-log record types in the IBM Informix Administrator's Reference.

Physical Log Is Logically Emptied

This step is the same for both fuzzy and full checkpoints. After the checkpoint-complete record is written to disk, the physical log is logically emptied, meaning that current entries in the physical log can be overwritten.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]