agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add VM corruption check to verify_heapam()
Date: Wed, 23 Sep 2026 22:23:02 +0000
Message-ID: <E1x9VMk-00000000yh4-1sdY@gemulon.postgresql.org> (raw)

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: https://postgr.es/m/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(+)



Message-ID: <E1x9VMk-00000000yh4-1sdY@gemulon.postgresql.org>
Permalink:  ../E1x9VMk-00000000yh4-1sdY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x9VMk-00000000yh4-1sdY@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add VM corruption check to verify_heapam()
  In-Reply-To: <E1x9VMk-00000000yh4-1sdY@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox