pgsql: Add VM corruption check to verify_heapam()

Started by Melanie Plageman2 months ago1 messagescommitters
Jump to latest
#1Melanie Plageman
melanieplageman@gmail.com

Add VM corruption check to verify_heapam()

Detect heap pages whose PD_ALL_VISIBLE flag is clear while either
visibility map bit is set. This inconsistent state can cause incorrect
index-only scan results and is not currently reported by verify_heapam().

This also helps users who have access to amcheck but not pg_visibility
to diagnose corruption.

Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: /messages/by-id/66mqpfyti3qhfttcsv6r2lbvqqd32rrmpn6i47ovrsnvguts46@gou54xc5jld3

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5d84c76021cb5a7591be848cd0004b8fd9453d1c

Modified Files
--------------
contrib/amcheck/verify_heapam.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)