Re: Excessive LOG messages from replication slot sync worker

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Japin Li <japinli(at)hotmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Excessive LOG messages from replication slot sync worker
Date: 2025-08-14 04:12:47
Message-ID: CAHGQGwED5kJxZ_MdCh=WLa5M7ekXdnzCO1ZCQhQNCEdfaEPwFQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 13, 2025 at 1:00 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Tue, Aug 12, 2025 at 4:28 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> >
> > I'm not sure these messages are useful for end users, and LOG might not be
> > the right level. They seem more like debug information, so should we consider
> > changing them to DEBUG, even with the proposed patch applied?
> >
>
> Yeah, we can do that for slotsync path but it should be okay to keep
> at LOG level for logical replication/decoding path as there it
> shouldn't hit as often as in slotsync path.

It looks like those two LOG messages are also generated by
pg_logical_slot_get_binary_changes(). When this function is
called every few seconds to capture changes in real time,
it can produce a large number of these messages. So shouldn't
we consider changing their log level to DEBUG also in such cases?

> But OTH, there is a
> argument that it can be DEBUG for logical replication/decoding path as
> well. From my experience, I can tell that these messages have been
> helpful in finding BF failures and debugging bugs from user reports,
> so there is value in keeping them at LOG level.

I understand these messages are useful for debugging,
but if they're now not intended for end users, perhaps they
should be DEBUG-level instead? We could also introduce
a new GUC to control whether these messages are logged for
debugging purposes and use it in regression tests for logical
decoding, or just set log_min_messages to DEBUG in those tests.
Thought?

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shinya Kato 2025-08-14 04:26:17 Re: Add log_autovacuum_{vacuum|analyze}_min_duration
Previous Message Fujii Masao 2025-08-14 04:08:40 Re: Excessive LOG messages from replication slot sync worker