Teach verify_heapam() to validate update chains within a page.

Robert Haas <rhaas@postgresql.org>

Commit: bbc1376b39627c6bddd8a0dc0a7dda24c91a97a0
Author: Robert Haas <rhaas@postgresql.org>
Date: 2023-03-22T12:48:54Z
Releases: 16.0
Teach verify_heapam() to validate update chains within a page.

Prior to this commit, we only consider each tuple or line pointer
on the page in isolation, but now we can do some validation of a line
pointer against its successor. For example, a redirect line pointer
shouldn't point to another redirect line pointer, and if a tuple
is HOT-updated, the result should be a heap-only tuple.

Himanshu Upadhyaya and Robert Haas, reviewed by Aleksander Alekseev,
Andres Freund, and Peter Geoghegan.

Files

PathChange+/−
contrib/amcheck/verify_heapam.c modified +285 −6
src/bin/pg_amcheck/t/004_verify_heapam.pl modified +239 −11