






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







address of updated page
id of transaction that did the update
before-image and after-image of the page
i^
k
k
recovery will replay operations in log
To update records on a page:^ –
Fetch(P)
read P into cache
Pin(P)
ensure P isn’t flushed
write lock (P)
for two-phase locking
write latch (P)
get exclusive access to P
update P
update P in cache
log the update to P
append it to the log
unlatch (P)
release exclusive access
Unpin(P)
allow P to be flushed
Stable Database
Log
Read,Write
Pin, Unpin
Fetch Cache Manager
Cache
Read, Write
Recovery Manager
FlushDeallocate
Transaction 1
Transaction 2
Transaction
Commit, Abort, Restart
Read,Write
Flush, dealloc for normal operat’n Restart uses Fetch, Pin, Unpin
Often called the Force-At-Commit rule
Usually called a Force algorithm, because updates are^ forced to disk before commit.
It’s easy, because you don’t need stable bookkeeping ofafter-images
But it’s inefficient for hot pages. (Consider TPC-A/B.)
Abort transactions that were active at the failure
For every committed transaction, redo updates that arein the log but not the stable database
Resume normal processing of transactions