Add code to apply some simple sanity checks to the header fields of a
Tom Lane <tgl@sss.pgh.pa.us>
Add code to apply some simple sanity checks to the header fields of a page when it's read in, per pghackers discussion around 17-Feb. Add a GUC variable zero_damaged_pages that causes the response to be a WARNING followed by zeroing the page, rather than the normal ERROR; this is per Hiroshi's suggestion that there needs to be a way to get at the data in the rest of the table.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/runtime.sgml | modified | +20 −2 |
| src/backend/storage/buffer/bufmgr.c | modified | +20 −1 |
| src/backend/storage/page/bufpage.c | modified | +46 −3 |
| src/backend/utils/misc/guc.c | modified | +5 −1 |
| src/backend/utils/misc/postgresql.conf.sample | modified | +1 −1 |
| src/include/storage/bufmgr.h | modified | +4 −1 |
| src/include/storage/bufpage.h | modified | +8 −39 |
| src/include/storage/page.h | deleted | +0 −25 |