Re: Reduce log level of some logical decoding messages to DEBUG1 - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: Reduce log level of some logical decoding messages to DEBUG1
Date
Msg-id CALj2ACUWnD=tg7ow+tx4zogSaJg=zr1_7KJwpU3h3MbaMyL0-w@mail.gmail.com
Whole thread
In response to Re: Reduce log level of some logical decoding messages to DEBUG1  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Reduce log level of some logical decoding messages to DEBUG1
List pgsql-hackers
Hi,

On Mon, Mar 23, 2026 at 8:44 AM Fujii Masao <masao.fujii@gmail.com> wrote:
>
> > I understand the chattiness of these when the decoding is done using
> > functions. But they seem to be useful when decoding using walsender
> > and replication connection. Also, it looks to me that the errdetail
> > describing various cases like when there are no running transactions,
> > when logical decoding will begin using saved snapshot, etc., is
> > helpful.
>
> I agree those messages are useful for developers. Do you think they're also
> useful for DBAs, and therefore should remain at LOG level?
>
> > - 1 for another GUC IMHO. How about we find if the logical decoding is
> > being done using walsender (a boolean like isDecodingUsingWalSender,
> > default being false, set to true when in walsender) and emit them at
> > LOG level when set to true. Would something like this work?
>
> If we want to see those messages when walsender is performing logical
> decoding, that should still be possible even if we lower the level to DEBUG1.
> With the recent extension to log_min_messages (commit 38e0190ced7),
> we can enable them just for walsender
> (e.g., log_min_messages = 'warning,walsender:debug1').

I agree with this. One could use the new log_min_messages feature
introduced in PG19 if wanted. Perhaps, it's a good idea to add this
recommendation to the commit message to help those wanting to enable
these logs.

I reviewed the v1 patch and it LGTM. Thanks!

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [Patch] add new parameter to pg_replication_origin_session_setup
Next
From: Amit Langote
Date:
Subject: Re: [PATCH] Fix wrong argument to SOFT_ERROR_OCCURRED in timestamptz_date