diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c
index ceaaa271680..7792b08b5f0 100644
--- a/contrib/amcheck/verify_nbtree.c
+++ b/contrib/amcheck/verify_nbtree.c
@@ -411,6 +411,13 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
BtreeLevel current;
Snapshot snapshot = SnapshotAny;
+ if (!readonly)
+ elog(DEBUG1, "verifying consistency of tree structure for index \"%s\"",
+ RelationGetRelationName(rel));
+ else
+ elog(DEBUG1, "verifying consistency of tree structure for index \"%s\" with cross-level checks",
+ RelationGetRelationName(rel));
+
/*
* RecentGlobalXmin assertion matches index_getnext_tid(). See note on
* RecentGlobalXmin/B-Tree page deletion.
@@ -654,7 +661,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
/* Use page-level context for duration of this call */
oldcontext = MemoryContextSwitchTo(state->targetcontext);
- elog(DEBUG2, "verifying level %u%s", level.level,
+ elog(DEBUG1, "verifying level %u%s", level.level,
level.istruerootlevel ?
" (true root level)" : level.level == 0 ? " (leaf level)" : "");
diff --git a/doc/src/sgml/amcheck.sgml b/doc/src/sgml/amcheck.sgml
index c912d2aa895..58b163a3d94 100644
--- a/doc/src/sgml/amcheck.sgml
+++ b/doc/src/sgml/amcheck.sgml
@@ -166,6 +166,27 @@ ORDER BY c.relpages DESC LIMIT 10;
+
+
+ bt_index_parent_check and
+ bt_index_parent_check both output log
+ messages about the verification process at
+ DEBUG1 and DEBUG2 severity
+ levels. These messages provide detailed information about the
+ verification process that may be of interest to
+ PostgreSQL developers. Advanced users
+ may also find this information helpful, since it provides
+ additional context should verification actually detect an
+ inconsistency. Running:
+
+SET client_min_messages = DEBUG1;
+
+ in an interactive psql session before
+ running a verification query will display messages about the
+ progress of verification with a manageable level of detail.
+
+
+