Shadow Paging | Database Management System

Shadow Paging | Database Management System

Shadow Paging Recovery Technique : Shadow paging is an alternative to log-based recovery; this scheme is useful if transactions execute Serially

Data isn’t updated in place

  • The database is considered to be made up of a number of n fixed-size disk blocks or pages, for recovery purposes.
  • A page table with n entries is constructed where the ith page table entry points to the ith database page on disk.
  • Current page table points to most recent current database


When a transaction begins executing

The Current page table is copied into a shadow page table

  • Shadow page table is then saved.
  • Shadow page table is never modified during transaction execution
  • Writes operations-new copy of database page is created and current page table entry modified to point to new disk page/block


To recover from a failure:

  • The state of the database before transaction execution is available through the shadow page table
  • Free modified pages
  • Discard current page table
  • That state is recovered by reinstating the shadow page table to become the current page table once mРћre
  • Committing a transaction
  • Discard previous shadow page
  • Free old page tables that it references