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?
- A. To determine the page's physical disk address
- B. To decide which transactions to roll back during the undo phase only
- 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)
- 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
- ARIES recovery performs three phases on restart: analysis, redo, then undo. Why must redo happen BEFORE undo, rather than undoing first…
- A Compensation Log Record (CLR) in ARIES, written while undoing a transaction's update, includes a field pointing to the next log record…
- Write-ahead logging (WAL) requires that:
- A fuzzy checkpoint in ARIES records the set of active (dirty) transactions and dirty pages at checkpoint time WITHOUT forcing all dirty…
- Strict two-phase locking (Strict 2PL) differs from basic 2PL in which way?
- Rigorous two-phase locking (Rigorous 2PL) goes one step further than Strict 2PL. What extra guarantee does it add?