amcheck: Add additional TOAST pointer checks.
authorRobert Haas <rhaas@postgresql.org>
Fri, 5 Nov 2021 13:17:40 +0000 (09:17 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 5 Nov 2021 13:24:25 +0000 (09:24 -0400)
commitbd807be6935929bdefe74d1258ca08048f0aafa3
tree15d7a9c58256d76f35a9c5d0d8a25966a7191aea
parentdb7d1a7b0530e8cbd045744e1c75b0e63fb6916f
amcheck: Add additional TOAST pointer checks.

Expand the checks of toasted attributes to complain if the rawsize is
overlarge.  For compressed attributes, also complain if compression
appears to have expanded the attribute or if the compression method is
invalid.

Mark Dilger, reviewed by Justin Pryzby, Alexander Alekseev, Heikki
Linnakangas, Greg Stark, and me.

Discussion: http://postgr.es/m/8E42250D-586A-4A27-B317-8B062C3816A8@enterprisedb.com
contrib/amcheck/verify_heapam.c
src/bin/pg_amcheck/t/004_verify_heapam.pl