Skip to content

Commit 1ac260c

Browse files
JelteFCommitfest Bot
authored andcommitted
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.
1 parent d3111cb commit 1ac260c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/cache/catcache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ RehashCatCache(CatCache *cp)
989989
int newnbuckets;
990990
int i;
991991

992-
elog(DEBUG1, "rehashing catalog cache id %d for %s; %d tups, %d buckets",
992+
elog(DEBUG5, "rehashing catalog cache id %d for %s; %d tups, %d buckets",
993993
cp->id, cp->cc_relname, cp->cc_ntup, cp->cc_nbuckets);
994994

995995
/* Allocate a new, larger, hash table. */
@@ -1027,7 +1027,7 @@ RehashCatCacheLists(CatCache *cp)
10271027
int newnbuckets;
10281028
int i;
10291029

1030-
elog(DEBUG1, "rehashing catalog cache id %d for %s; %d lists, %d buckets",
1030+
elog(DEBUG5, "rehashing catalog cache id %d for %s; %d lists, %d buckets",
10311031
cp->id, cp->cc_relname, cp->cc_nlist, cp->cc_nlbuckets);
10321032

10331033
/* Allocate a new, larger, hash table. */

0 commit comments

Comments
 (0)