Re: Invalid primary_slot_name triggers warnings in all processes on reload
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Álvaro Herrera <alvherre@kurilemu.de>, Chao Li <li.evan.chao@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-10T05:52:02Z
Lists: pgsql-hackers
Attachments
- v5-0002-Avoid-double-translation-of-messages-for-invalid-.patch (application/octet-stream) patch v5-0002
- v5-0001-Make-invalid-primary_slot_name-follow-standard-GU.patch (application/octet-stream) patch v5-0001
On Thu, Oct 9, 2025 at 2:26 PM Fujii Masao <masao.fujii@gmail.com> wrote: > > Please note that since you're using already translated strings as > > arguments, you must use errmsg_internal() and errhint_internal(), to > > avoid doubly-translating these messages. > > I've updated the patch to use errmsg_internal() and errhint_internal(). > However, for GUCs, GUC_check_errdetail() and GUC_check_errhint() are > still used - and since they also translate their input, we might need > something like GUC_check_errdetail_internal() and > GUC_check_errhint_internal() to avoid double translation. Thought? > I haven't added those functions in the attached patch yet. OK, I've implemented this and attached two patches. 0001 fixes the issue we've been discussing. It's mostly the same as the previous version I posted. 0002 adds GUC_check_errmsg_internal(), GUC_check_errdetail_internal(), and GUC_check_errhint_internal(). These work like their counterparts (e.g., GUC_check_errmsg()) but skip translation. It also updates the check hook for primary_slot_name to use these new functions when handling already-translated error messages. Regards, -- Fujii Masao
Commits
-
Make invalid primary_slot_name follow standard GUC error reporting.
- b00a16baeb2a 13.23 landed
- f106f53df6f5 14.20 landed
- caf529aba22d 15.15 landed
- 4fd916eab99c 16.11 landed
- 1db2870bb5ab 17.7 landed
- 6ff7ba9fe525 18.1 landed
- f33e60a53a9c 19 (unreleased) landed