Also called: write-ahead rule, WAL rule, pd_lsn flush gate
In plain English
The WAL-before-data rule says a modified data page may not be flushed to disk until the WAL describing that modification is already durable. PostgreSQL enforces it by stamping each page with the LSN of the last WAL tuple/" title="Tuple">record that changed it (pd_lsn); the buffer manager checks that the WAL is flushed up to that LSN before writing the page out.
Why it matters
This single rule is what makes crash recovery sound. If data could reach disk before its WAL, a crash could leave changes with no log to recover or undo them. Because of the rule, recovery can always replay WAL forward onto the last consistent data and arrive at a correct state.