CS FundamentalsModerateIBM · Deloitte pattern

Write-ahead logging (WAL) requires that:

  1. A. Log records are optional as long as a checkpoint exists
  2. B. WAL only applies to the undo phase, not redo
  3. C. Log records for a change must be written to stable storage before the corresponding data page change is written to disk
  4. D. Data pages must always be written to disk before their log records

Correct answer: C. Log records for a change must be written to stable storage before the corresponding data page change is written to disk

WAL's defining rule is: before a dirty page is flushed to disk, every log record describing changes on that page (up to the LSN 'covering' the change) must already be durable. This guarantees recovery can always redo (or undo) a change using the log, even if the actual data page write never made it to disk before a crash.

More DBMS and SQL questions

Exams that ask this topic