From 7905416eef9b2ad2ff8783330d830ef2c28bef2a Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Tue, 30 Jun 2026 16:16:56 +0900 Subject: [PATCH] Use placeholders and not GUC names in error message (autovacuum) A placeholder %s is now used instead of the GUC names in the error string of this routine. This is going to be useful for a follow-up patch, where we will be able to reuse the same string, hence reducing the translation work. Based on a suggestion by me. Author: Baji Shaik Discussion: https://postgr.es/m/ajnhfw84reaXgjfO@paquier.xyz --- src/backend/postmaster/autovacuum.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index e9aaf24c1be..127bd9e7da3 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -3632,10 +3632,11 @@ check_av_worker_gucs(void) if (autovacuum_worker_slots < autovacuum_max_workers) ereport(WARNING, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("\"autovacuum_max_workers\" (%d) should be less than or equal to \"autovacuum_worker_slots\" (%d)", - autovacuum_max_workers, autovacuum_worker_slots), - errdetail("The server will only start up to \"autovacuum_worker_slots\" (%d) autovacuum workers at a given time.", - autovacuum_worker_slots))); + errmsg("\"%s\" (%d) should be less than or equal to \"%s\" (%d)", + "autovacuum_max_workers", autovacuum_max_workers, + "autovacuum_worker_slots", autovacuum_worker_slots), + errdetail("The server will only start up to \"%s\" (%d) autovacuum workers at a given time.", + "autovacuum_worker_slots", autovacuum_worker_slots))); } /*