During WAL recovery, when reading a page that we intend to overwrite completely
Tom Lane <tgl@sss.pgh.pa.us>
During WAL recovery, when reading a page that we intend to overwrite completely from the WAL data, don't bother to physically read it; just have bufmgr.c return a zeroed-out buffer instead. This speeds recovery significantly, and also avoids unnecessary failures when a page-to-be-overwritten has corrupt page headers on disk. This replaces a former kluge that accomplished the latter by pretending zero_damaged_pages was always ON during WAL recovery; which was OK when the kluge was put in, but is unsafe when restoring a WAL log that was written with full_page_writes off. Heikki Linnakangas
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlogutils.c | modified | +8 −3 |
| src/backend/storage/buffer/bufmgr.c | modified | +39 −9 |
| src/include/storage/bufmgr.h | modified | +2 −1 |