002_compare_backups.pl compares pg_dumpall output — a logical oracle blind to VM/FSM/index state. Build the physical oracle: run a concurrent mixed workload (DML + VACUUM FREEZE + bulk COPY + truncate/re-extend), take a full backup plus chained incrementals, then combine. Because separately taken backups naturally have different stop LSNs, do not compare against a reference full backup at the same stop-LSN; instead restore both paths (the combined incremental chain and a reference full backup) and replay each to one common target LSN, then compare block-by-block for main/VM/init forks. Physical comparison requires AM/fork-aware normalization — masking LSN/checksum/hint bits alone is not generally sufficient. Supplement with pg_amcheck and pg_visibility sweeps. This catches the whole unregistered-buffer class rather than enumerated known operations.
002_compare_backups.pl compares pg_dumpall output — a logical oracle blind to VM/FSM/index state. Build the physical oracle: run a concurrent mixed workload (DML + VACUUM FREEZE + bulk COPY + truncate/re-extend), take a full backup plus chained incrementals, then combine. Because separately taken backups naturally have different stop LSNs, do not compare against a reference full backup at the same stop-LSN; instead restore both paths (the combined incremental chain and a reference full backup) and replay each to one common target LSN, then compare block-by-block for main/VM/init forks. Physical comparison requires AM/fork-aware normalization — masking LSN/checksum/hint bits alone is not generally sufficient. Supplement with pg_amcheck and pg_visibility sweeps. This catches the whole unregistered-buffer class rather than enumerated known operations.