From cce8784ffa874c6ace88b7cfdac86f2fe2e2f365 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Thu, 2 Apr 2026 13:52:21 -0500 Subject: [PATCH v8 3/5] add elevel parameter to relation_needs_vacanalyze() --- src/backend/postmaster/autovacuum.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 817025ce616..12c205e57ea 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -378,6 +378,7 @@ static void relation_needs_vacanalyze(Oid relid, AutoVacOpts *relopts, Form_pg_class classForm, PgStat_StatTabEntry *tabentry, int effective_multixact_freeze_max_age, + int elevel, bool *dovacuum, bool *doanalyze, bool *wraparound, AutoVacuumScores *scores); @@ -2075,6 +2076,7 @@ do_autovacuum(void) /* Check if it needs vacuum or analyze */ relation_needs_vacanalyze(relid, relopts, classForm, tabentry, effective_multixact_freeze_max_age, + DEBUG3, &dovacuum, &doanalyze, &wraparound, &scores); @@ -2175,6 +2177,7 @@ do_autovacuum(void) relation_needs_vacanalyze(relid, relopts, classForm, tabentry, effective_multixact_freeze_max_age, + DEBUG3, &dovacuum, &doanalyze, &wraparound, &scores); @@ -2993,6 +2996,7 @@ recheck_relation_needs_vacanalyze(Oid relid, relation_needs_vacanalyze(relid, avopts, classForm, tabentry, effective_multixact_freeze_max_age, + DEBUG3, dovacuum, doanalyze, wraparound, &scores); @@ -3087,6 +3091,7 @@ relation_needs_vacanalyze(Oid relid, Form_pg_class classForm, PgStat_StatTabEntry *tabentry, int effective_multixact_freeze_max_age, + int elevel, /* output params below */ bool *dovacuum, bool *doanalyze, @@ -3338,14 +3343,14 @@ relation_needs_vacanalyze(Oid relid, } if (vac_ins_base_thresh >= 0) - elog(DEBUG3, "%s: vac: %.0f (thresh %.0f, score %.2f), ins: %.0f (thresh %.0f, score %.2f), anl: %.0f (thresh %.0f, score %.2f), xid score: %.2f, mxid score: %.2f", + elog(elevel, "%s: vac: %.0f (thresh %.0f, score %.2f), ins: %.0f (thresh %.0f, score %.2f), anl: %.0f (thresh %.0f, score %.2f), xid score: %.2f, mxid score: %.2f", NameStr(classForm->relname), vactuples, vacthresh, scores->vac, instuples, vacinsthresh, scores->vac_ins, anltuples, anlthresh, scores->anl, scores->xid, scores->mxid); else - elog(DEBUG3, "%s: vac: %.0f (thresh %.0f, score %.2f), ins: (disabled), anl: %.0f (thresh %.0f, score %.2f), xid score: %.2f, mxid score: %.2f", + elog(elevel, "%s: vac: %.0f (thresh %.0f, score %.2f), ins: (disabled), anl: %.0f (thresh %.0f, score %.2f), xid score: %.2f, mxid score: %.2f", NameStr(classForm->relname), vactuples, vacthresh, scores->vac, anltuples, anlthresh, scores->anl, -- 2.50.1 (Apple Git-155)