From e8ef752395756065c89774596c1dd93bf5621e71 Mon Sep 17 00:00:00 2001
From: Andrey Borodin <amborodin@acm.org>
Date: Thu, 5 Mar 2026 08:59:07 +0500
Subject: [PATCH v4 5/5] amcheck docs: note two Bloom filters memory usage,
 Bloom filter probability

- When both heapallindexed and indexallkeysmatch are enabled, two Bloom
  filters are allocated, each up to maintenance_work_mem
- Add ~2% probability note for indexallkeysmatch, matching heapallindexed
---
 doc/src/sgml/amcheck.sgml | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/doc/src/sgml/amcheck.sgml b/doc/src/sgml/amcheck.sgml
index 793fd1661ff..e4b5f7d320b 100644
--- a/doc/src/sgml/amcheck.sgml
+++ b/doc/src/sgml/amcheck.sgml
@@ -418,6 +418,11 @@ SET client_min_messages = DEBUG1;
   single absent or malformed tuple has a new opportunity to be
   detected with each new verification attempt.
  </para>
+ <para>
+  When both <parameter>heapallindexed</parameter> and
+  <parameter>indexallkeysmatch</parameter> are enabled, two Bloom
+  filters are allocated, each up to <varname>maintenance_work_mem</varname>.
+ </para>
 
  </sect2>
 
@@ -451,7 +456,12 @@ SET client_min_messages = DEBUG1;
  <para>
   The summarizing structure is bound in size by
   <varname>maintenance_work_mem</varname>, using the same sizing
-  approach as <parameter>heapallindexed</parameter>.
+  approach as <parameter>heapallindexed</parameter>.  In order to ensure
+  that there is no more than a 2% probability of failure to detect an
+  inconsistency for each index tuple that should match a heap tuple,
+  approximately 2 bytes of memory are needed per tuple.  As less memory
+  is made available per tuple, the probability of missing an
+  inconsistency slowly increases.
  </para>
 
  </sect2>
-- 
2.51.2

