CS FundamentalsVery hardGATE

ARIES recovery uses a Log Sequence Number (LSN) stored on each data page, recording the LSN of the last log record that modified that page. What is this used for during restart recovery's analysis/redo phase?

  1. A. To determine the page's physical disk address
  2. B. To decide which transactions to roll back during the undo phase only
  3. C. To avoid unnecessarily redoing an update whose effect is already reflected on the page on disk (if the page's LSN is already ≥ the log record's LSN, that update is skipped during redo)
  4. D. To encrypt the page's contents

Correct answer: C. To avoid unnecessarily redoing an update whose effect is already reflected on the page on disk (if the page's LSN is already ≥ the log record's LSN, that update is skipped during redo)

Comparing a log record's LSN against the page's stored LSN lets redo skip updates already durably applied to that page (page LSN ≥ log record's LSN means 'already applied'), which is essential since ARIES redoes history starting from the earliest potentially-unwritten change, not from scratch — this is the core of the 'repeating history' redo pass.

More DBMS and SQL questions

Exams that ask this topic