Recovery Flashcards
what is log based recovery?
- a log is kept on stable storage
- when a transaction starts, it registers itself on the log
- before a write, the transaction writes to the log with the value before and after the change
- write commit to log when complete
what is deferred database modification?
a log approach
- writes to the log deferred to after a partial commit
- then, during recovery, a transaction needs to be redone only if start and commit are both in the log
what is immediate database modification?
a log approach
- allows database updates of an uncommitted transaction to be made as the writes are issued
- need to keep track of the previous values
- if transaction has both start and commit, redo
- if start but no commit, undo
-
what is a checkpoint?
a checkpoint in a log marks that everything prior has been flushed to disk
avoids us going through stuff unnecessarily
what is shadow paging?
an alternative log-based stuff
two page tables that represent data
- current pages
- shadow pages
the shadow page is always consistent
the current includes the transactions in process
when a page is about to be written, copy it
the current points to the copy, shadow to the original#
make changes to the copy, update shadow pointer to the copy
DOESNT WORK WITH CONCURRENT TRANSACTION