From: | vignesh C <vignesh21(at)gmail(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
Cc: | Álvaro Herrera <alvherre(at)kurilemu(dot)de>, 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-18 17:06:15 |
Message-ID: | CALDaNm0D6Acx1v-t2cZLumRJoRDT+ZBY4P1S_zh2kdcX4_Ph3Q@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 18 Jul 2025 at 04:46, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>
>
>
> 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!
The attached v6 version patch has the changes for these comments.
Regards,
Vignesh
Attachment | Content-Type | Size |
---|---|---|
v6-0003-Use-libpqsrv_notice_receiver-for-remote-server-co.patch | text/x-patch | 1.1 KB |
v6-0001-Add-custom-PQsetNoticeReceiver-handlers-for-repli.patch | text/x-patch | 2.9 KB |
v6-0002-Use-libpqsrv_notice_receiver-for-remote-server-co.patch | text/x-patch | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2025-07-18 17:06:30 | Re: Proposal: Out-of-Order NOTIFY via GUC to Improve LISTEN/NOTIFY Throughput |
Previous Message | Andres Freund | 2025-07-18 17:03:22 | Re: [PATCH] Let's get rid of the freelist and the buffer_strategy_lock |