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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <fujii(at)postgresql(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Reduce log level of some logical decoding messages from LOG to D
Date: 2026-04-02 19:56:26
Message-ID: CA+TgmoYsu2+YAo9eLGkDp5VP-pfQ-jOoX382vS4THKHeRTNgew@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Apr 1, 2026 at 2:44 AM Fujii Masao <fujii(at)postgresql(dot)org> wrote:
> Reduce log level of some logical decoding messages from LOG to DEBUG1

Hi,

Apologies for not having noticed this thread before the patch was
committed, but I have some reservations about this change. I agree
that if someone is calling pg_logical_slot_get_changes() regularly, it
isn't good to write a LOG message every time. However, I am concerned
that this may make problems with regular logical decoding much harder
to debug. I see that there was some discussion of adding a GUC to
raise the level back up to LOG, but I feel like that wouldn't help
much. If something goes wrong, enabling the messages for the future
won't tell you what went wrong in the past. I am wondering whether a
better approach might be to set the LOG level based on context -- that
is, if it's actually logical decoding, log this at LOG, but if it's
just someone peeking at a slot or similar, reduce the log level to
DEBUG1 or, really, probably more like DEBUG3.

Thoughts?

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2026-04-02 21:21:45 pgsql: Further harden tests that might use not-so-compatible tar versio
Previous Message Andrew Dunstan 2026-04-02 19:20:03 pgsql: Rename jsonpath method arg tokens

Browse pgsql-hackers by date

  From Date Subject
Next Message Florents Tselai 2026-04-02 19:57:28 Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part
Previous Message Tomas Vondra 2026-04-02 19:46:40 Re: Change default of jit to off