Prashant Shubham

Prashant Shubham

Computers are all I want to know about

27 Nov 2024

Chapter 10 - WAL

Summary

Logging is required to save/guarantee data durability, since some of data is in RAM/main-memory before committing to disk we need to ensure the updates are safe whenever received from user to database.

Notes During Reading

Logging

OperationLoggedComments
Modifications in the buffer cacheYesWrites are deferred
Transaction commits and rollbacksYesStatus change happens in CLOG buffers
File operationsYesMust be in sync with data changes
Operations on UNLOGGED tablesNo
Operations on temporary tablesNoSince there lifetime is anyway limited by session

WAL Structure