Re: Reduce log level of some logical decoding messages to DEBUG1

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Reduce log level of some logical decoding messages to DEBUG1
Date: 2026-03-25 03:09:48
Message-ID: CALj2ACUWnD=tg7ow+tx4zogSaJg=zr1_7KJwpU3h3MbaMyL0-w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Mar 23, 2026 at 8:44 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2026-03-25 03:13:55 Re: [PATCH] Fix wrong argument to SOFT_ERROR_OCCURRED in timestamptz_date
Previous Message Amit Kapila 2026-03-25 03:02:51 Re: [Patch] add new parameter to pg_replication_origin_session_setup