Even though the message literally says whether the index "can safely" or "cannot" use deduplication, the function specifically avoids the debug message for system columns, so I think it also makes sense to hide it when deduplication is turned off.
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index 2f5f14e527..b78b542429 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -2710,6 +2710,9 @@ _bt_allequalimage(Relation rel, bool debugmessage) if (IsSystemRelation(rel)) return false; + if (!BTGetDeduplicateItems(rel)) + return false; + for (int i = 0; i < IndexRelationGetNumberOfKeyAttributes(rel); i++) { Oid opfamily = rel->rd_opfamily[i]; -- 2.17.0