Questions? -------------------- Transaction Table: TT Dirty Page Table: DPT Log Entries =============================== LSN: Log sequence number LSN Ti updates Pi old_value new_value PREV_LSN LSN Ti commit PREV_LSN LSN Ti abort PREV_LSN LSN Ti end PREV_LSN LSN undo (Ti updates Pi old_value new_value) Checkpoints LSN BEGIN CHECKPOINT LSN dump of TT LSN dump of DPT LSN END CHECKPOINT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FORCE/STEAL FORCE: Whenever a transaction Ti wants to commit: 1. flush the log to disk 2. Write all the pages modified by Ti 3. Write commit record for Ti to log, flush the log to disk 4. Allow Ti to commit NO FORCE: Whenever a transaction Ti wants to commit: 1. Write the commit record for Ti and flush the log to disk 2. Allow Ti to commit (*) Pages modified by the transaction will be written to disk by the DBMS as needed/not needed by other transactions If FORCE is used -> Recovery does not need REDO operations. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ STEAL: Whenever a transaction wants to use a memory block allocated to a page modified by an uncommited transaction: 1. Flush the log (Write Ahead Logging) 2. Write the modified page to disk and free up memory it occupied NO STEAL: Pin all memory blocks occupied by an uncommitted transaction and keep all dirty pages in memory until transaction commits. If no steal is used, then recovery does not need to use UNDO steps.