pg_waldump is a PostgreSQL command-line utility for displaying and parsing write-ahead log records. In a backup test, it provides an early check that the WAL needed for recovery is readable and parsable before starting the restored instance. section 9.4
Use pg_waldump as one step in a restore fire drill:
- Copy the base backup into a testing PGDATA directory. section 9.4
- Verify the base backup with pg_verifybackup. section 9.4
- Copy WAL generated since the backup into the test environment. section 9.4
- Call pg_waldump on those WAL files, then start PostgreSQL and confirm that recovery reaches a consistent state. section 9.4
Parsing WAL does not prove that every restored table page is readable. For deeper verification, inspect relation pages with pageinspect, checking page headers and checksums; automate the procedure and alert on errors. section 9.4
