Re: Invalid primary_slot_name triggers warnings in all processes on reload

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Invalid primary_slot_name triggers warnings in all processes on reload
Date: 2025-10-21 06:11:26
Message-ID: CAHGQGwEvvHre_+sXi_qzaKcYOFb+bOkn3UQ+5s-E7RXhMopVZQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 10, 2025 at 2:52 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Thu, Oct 9, 2025 at 2:26 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)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.

No comments on the latest patches — maybe that’s a good
sign of their quality? ;)

Anyway, unless there are any objections, I plan to commit at least
the 0001 patch and backpatch it to all supported branches. I've
attached the patches for the back branches for reference.

Regarding the backpatch: in v17 and earlier, since errhint_internal()
doesn't exist, I used errhint() instead. That means the hint message
might be translated twice, but I think that's minor and acceptable.
Or do you think we should instead backpatch errhint_internal() to
those older branches to avoid the double translation?

Regards,

--
Fujii Masao

Attachment Content-Type Size
v6-0001-PG16-PG17-Make-invalid-primary_slot_name-follow-standard-GU.txt text/plain 6.0 KB
v6-0001-Make-invalid-primary_slot_name-follow-standard-GU.patch application/octet-stream 7.0 KB
v6-0001-PG13-PG15-Make-invalid-primary_slot_name-follow-standard-GU.txt text/plain 5.9 KB
v6-0001-PG18-Make-invalid-primary_slot_name-follow-standard-GU.txt text/plain 6.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2025-10-21 06:13:26 Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array
Previous Message jian he 2025-10-21 06:06:47 CREATE POLICY IF NOT EXISTS