From f1a08ce54306f45ee8a779dedbf831c3d4b360b3 Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Fri, 30 May 2025 14:22:49 +0200 Subject: [PATCH] Reduce DEBUG level of catcache refreshing messages When testing extensions using pgregress, it can be useful to introduce some new DEBUG logs which are specific to the extension and change the log level during part of the of the test. There's a problem though: Often a "rehashing catalog cache ..." debug message will also show up in those cases. It's not always possible to predict when these messages show, and when they do their contents can easily change if changes are made to an unrelated test or when run against a different Postgres version. This change lowers the log level of these messages to DEBUG5, so that they can be ignored while still showing other (more predictable) DEBUG messages. --- src/backend/utils/cache/catcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index 657648996c23..fde6681bedc1 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -988,7 +988,7 @@ RehashCatCache(CatCache *cp) int newnbuckets; int i; - elog(DEBUG1, "rehashing catalog cache id %d for %s; %d tups, %d buckets", + elog(DEBUG5, "rehashing catalog cache id %d for %s; %d tups, %d buckets", cp->id, cp->cc_relname, cp->cc_ntup, cp->cc_nbuckets); /* Allocate a new, larger, hash table. */ @@ -1026,7 +1026,7 @@ RehashCatCacheLists(CatCache *cp) int newnbuckets; int i; - elog(DEBUG1, "rehashing catalog cache id %d for %s; %d lists, %d buckets", + elog(DEBUG5, "rehashing catalog cache id %d for %s; %d lists, %d buckets", cp->id, cp->cc_relname, cp->cc_nlist, cp->cc_nlbuckets); /* Allocate a new, larger, hash table. */