CSE Roadmap

Core tier · about 2 hours · 5 parts

Part 3 of 5 · 1 min read

Dirty pages

A page modified in memory but not yet written back to disk.

Think of editing a document in a word processor. The change exists on screen immediately, but is not actually saved to the file on disk until an explicit save happens.

In plain words: a dirty page is a page in the buffer pool that has been modified in memory but not yet written back to disk. A dirty page cannot simply be discarded from memory, since that would lose the change entirely. It must be written back to disk first.

A worked example. Updating a book's price changes the in-memory copy of its page immediately, marking that page dirty, while the actual block on disk may still briefly hold the old value until the dirty page is written back.

The key lines. No SQL; marking a page dirty is an internal bookkeeping detail of the storage engine.

Dirty page

A dirty page is a buffer pool page modified in memory but not yet written back to disk. It must be written back before being discarded from memory.

Example: after a price update, that row's page is marked dirty until the storage engine writes it back to disk.