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 <baji.pgdev@gmail.com>
Discussion: https://postgr.es/m/ajnhfw84reaXgjfO@paquier.xyz
This commit is contained in:
Michael Paquier 2026-06-30 16:16:56 +09:00
parent c776550e46
commit 7905416eef

View file

@ -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)));
}
/*