Re: Log prefix missing for subscriber log messages received from publisher

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>, Fujii Masao <masao.fujii@gmail.com>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-19T06:45:31Z
Lists: pgsql-hackers

Attachments

On Sat, 19 Jul 2025 at 01:39, Álvaro Herrera <alvherre@kurilemu.de> wrote:
>
> On 2025-Jul-18, vignesh C wrote:
>
> > diff --git a/contrib/postgres_fdw/connection.c b/contrib/postgres_fdw/connection.c
> > index 304f3c20f83..c1ce6f33436 100644
> > --- a/contrib/postgres_fdw/connection.c
> > +++ b/contrib/postgres_fdw/connection.c
> > @@ -625,6 +625,9 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
> >                                                       server->servername),
> >                                        errdetail_internal("%s", pchomp(PQerrorMessage(conn)))));
> >
> > +             PQsetNoticeReceiver(conn, libpqsrv_notice_receiver,
> > +                                                     "received message via remote connection");
> > +
>
> These need to be:
>
>     PQsetNoticeReceiver(conn, libpqsrv_notice_receiver,
>                         gettext_noop("received message via remote connection"));
>
> so that the strings are picked up by gettext.

Modified

> Also, I don't see why there are three patches here instead of just one.

Earlier we thought to commit replication changes function firstlly and
then commit dblink and fdw changes, but now that we are using a common
notice receiver function. I feel it can be a single patch. Merged the
patches. The attached v7 version patch has the changes for the same.

Regards,
Vignesh

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Remove translation marker from libpq-be-fe-helpers.h.

  2. Log remote NOTICE, WARNING, and similar messages using ereport().

  3. Remove translation markers from libpq-be-fe-helpers.h