pageinspect is a PostgreSQL extension for validating whether pages in a restored database are readable and internally consistent. It turns backup testing from a startup-only check into a page-by-page inspection. section 9.4
Use pageinspect during a restored-backup fire drill to inspect every page of every relation:
- Read each page from disk with get_raw_page(). section 9.4
- Inspect the page header with page_header(). section 9.4
- Verify the page checksum with page_checksum(). section 9.4
Restored-backup validation
After copying a base backup and subsequent WAL into a test PGDATA directory, start PostgreSQL to reach a consistent state, then use pageinspect to check every page for readability, valid headers, and valid checksums. Automate the procedure and alert on errors. section 9.4
