Teach verify_heapam() to validate update chains within a page.
authorRobert Haas <rhaas@postgresql.org>
Wed, 22 Mar 2023 12:48:54 +0000 (08:48 -0400)
committerRobert Haas <rhaas@postgresql.org>
Wed, 22 Mar 2023 12:48:54 +0000 (08:48 -0400)
commitbbc1376b39627c6bddd8a0dc0a7dda24c91a97a0
tree987cb7718fb6c5c82861ac65d290239551dba53b
parentd69c404c4cc5985d8ae5b5ed38bed3400b317f82
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.
contrib/amcheck/verify_heapam.c
src/bin/pg_amcheck/t/004_verify_heapam.pl