]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Add LOG_NEVER error level code.
authorNathan Bossart <nathan@postgresql.org>
Thu, 9 Apr 2026 15:18:15 +0000 (10:18 -0500)
committerNathan Bossart <nathan@postgresql.org>
Thu, 9 Apr 2026 15:18:15 +0000 (10:18 -0500)
This logging level means not to emit the log, which is useful for
functions like relation_needs_vacanalyze().  This function accepts
a log level argument but not all callers want it to emit logs.

Suggested-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/3101163.1775676098%40sss.pgh.pa.us

src/backend/postmaster/autovacuum.c
src/include/utils/elog.h

index bd626a16363b12909694501ce3de0b2ca8da4058..f9fa874b79f2232ba9eeddbc07241ba2892e5743 100644 (file)
@@ -3676,7 +3676,8 @@ pg_stat_get_autovacuum_scores(PG_FUNCTION_ARGS)
 
                avopts = extract_autovac_opts(tup, RelationGetDescr(rel));
                relation_needs_vacanalyze(form->oid, avopts, form,
-                                                                 effective_multixact_freeze_max_age, 0,
+                                                                 effective_multixact_freeze_max_age,
+                                                                 LOG_NEVER,
                                                                  &dovacuum, &doanalyze, &wraparound,
                                                                  &scores);
                if (avopts)
index 440a02dd147417993227100e292ee95fe0f3ccec..9c1e75c59ac60d48cb8cf883827d969d653e0d43 100644 (file)
@@ -23,6 +23,7 @@ struct Node;
 
 
 /* Error level codes */
+#define LOG_NEVER      0                       /* Never emit this message */
 #define DEBUG5         10                      /* Debugging messages, in categories of
                                                                 * decreasing detail. */
 #define DEBUG4         11