Re: pgsql: Reduce log level of some logical decoding messages from LOG to D

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-07T03:32:54Z
Lists: pgsql-hackers
On Tue, Apr 7, 2026 at 8:48 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Apr 7, 2026 at 8:34 AM Fujii Masao <masao.fujii@gmail.com> wrote:
> >
> > On Tue, Apr 7, 2026 at 1:16 AM Robert Haas <robertmhaas@gmail.com> wrote:
> > > > But probably are you suggesting making this behavior the default? If yes,
> > > > one straightforward approach to implement that would be to log these messages
> > > > at LOG when AmWalSenderProcess() or AmLogicalSlotSyncWorkerProcess() is true,
> > > > and at DEBUG1 otherwise.
> > >
> > > Yeah.
> >
> > OK, I've prepared a patch to implement this. Patch attached.
> > It introduces a LogicalDecodingLogLevel() macro to choose the log level
> > based on context, but the name may not be ideal, so suggestions are welcome.
> >
>
> How about adding repack_worker to that check as well? See 28d534e2ae.
>

The other possibility is to use AmRegularBackendProcess() to decide
the log_level in this case.

-- 
With Regards,
Amit Kapila.



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Adjust log level of logical decoding messages by context

  2. Reduce log level of some logical decoding messages from LOG to DEBUG1