Note
Full-page writes and torn pages
A torn page is what you get when the operating system writes only part of an 8 KB PostgreSQL page before power is lost: the disk sector size is smaller than the page, so half the page can be new and half old. Replaying a normal WAL record against such a page would corrupt it further, because the record assumes the page looked exactly like it did before the change.
PostgreSQL’s answer is the full-page write (also called a full-page image, FPI): the first time a page is modified after a checkpoint, the WAL record carries the entire page, not just the delta. On recovery, that copy simply overwrites whatever is on disk, torn or not. Later changes to the same page before the next checkpoint carry only deltas, because the full copy in the log has already made the page’s starting state safe.
full_page_writes can be turned off on storage that guarantees atomic page writes. Most people should not.
Related: pd_lsn vs record LSN.