Recovery System
Failure Classification
Transaction failure
Logical error
System error
Disk failure
System crash
recovery algorithms
Actions taken during normal transaction processing to ensure that enough information exists to allow recovery from failures.
Actions taken after a failure to recover the database contents to a state that ensures database consistency, transaction atomicity, and durability
Storage
Stable-Storage Implementation
Block transfer between memory and disk storage
Partial failure
Total failure
Successful completion
Data Access
data-transfer failure
blocks
two physical blocks
one remote
blocks
physical
blocks
disk
buffer
buffer
blocks
between disk and main memory
input
output
write
read
Recovery and Atomicity
Log Records
update log record
Old value
New value
Data-item identifier
Transaction identifier
Database Modification
Concurrency Control and Recovery
undo changes made by a transaction
The transaction modifies the data block in the disk buffer in main memory holding the data item
The database system executes the output operation that writes the data block to disk
The transaction performs some computations in its own private part of main memory
Redo
Undo
Transaction Commit
Using the Log to Redo and Undo Transactions
Checkpoints
Recovery Algorithm
Transaction Rollback
Recovery After a System Crash
Buffer Management
Log-Record Buffering
Database Buffering
Operating System Role in Buffer Management
Fuzzy Checkpointing
Failure with Loss of Nonvolatile Storage
no transaction may be active
dumping
Copy the contents of the database to stable storage
Output a log record <dump> onto the stable storage
Output all buffer blocks onto the disk
Output all log records currently residing in main memory onto stable storage.
Early Lock Release and Logical Undo Operations
Logical Operations
Logical Undo Log Records
Transaction Rollback With Logical Undo
Concurrency Issues in Logical Undo
ARIES
Uses
Supports
log sequence number
physiological redo
dirty page table
fuzzy-checkpointing
Data Structures
Recovery Algorithm
Redo pass
Undo pass
Analysis pass
Analysis Pass
Redo Pass
Remote Backup Systems
Undo Pass and Transaction Rollback
Time to commit
Time to recover
Transfer of control
Detection of failure
Two-very-safe
Two-safe
One-safe
Alvaro Moreira Villalobos
Silberschatz, A., Korth, H., & Sudarshan, S. (2019). Database System Concepts (7a ed.). McGraw-Hill.