From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
Cc: | vignesh C <vignesh21(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Log prefix missing for subscriber log messages received from publisher |
Date: | 2025-07-17 23:16:29 |
Message-ID: | 1c82ebbe-6826-4e44-b32b-88110a5fe6ed@oss.nttdata.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2025/07/18 1:15, Álvaro Herrera wrote:
> On 2025-Jul-18, Fujii Masao wrote:
>
>> The current patches add nearly identical notice_receiver functions
>> in multiple places such as libpqwalreceiver.c and elsewhere. To avoid
>> duplicating the same logic, could we define a shared notice receiver
>> function in a common file, like libpq-be-fe-helpers.h, and use it in
>> all three locations?
>
> I like the idea of reducing duplication. I don't like the "prefix"
> as proposed though, because it's not going to work well for translation
> (string building) -- I'd rather pass the entire phrase from caller, so
> that the translator has one piece to translate which lives in the module
> that emits it. I think I'd do something like
>
> ereport(LOG,
> errmsg_internal("%s: %.*s",
> _(prefix), len, message));
>
> and see to it that each caller uses gettext_noop() around the string
> they pass as "arg", for gettext to collect.
Agreed. Thanks!
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
From | Date | Subject | |
---|---|---|---|
Next Message | Mihail Nikalayeu | 2025-07-17 23:26:14 | Re: Issues with hash and GiST LP_DEAD setting for kill_prior_tuple |
Previous Message | Laurenz Albe | 2025-07-17 21:35:00 | Re: Collation and primary keys |