Operation Logging
Record locking requires (at least) record logging.
- Suppose records x and y are on page P
- w1[x] w2[y] abort1 commit2 (not strict w.r.t. pages)
But record logging implies Restart must read a page before updating it
Further reduce log size by logging description of an update, not the entire before/after image.
- Only log after-image of an insertion
- Only log fields being updated
Now Restart can’t blindly redo.
- E.g., it must not insert a record twice