Re: pgsql: Reduce log level of some logical decoding messages from LOG to D
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-07T03:51:32Z
Lists: pgsql-hackers
On Tue, Apr 7, 2026 at 12:18 PM 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. Thanks for the info! It may be better to use DEBUG1 when AmRegularBackendProcess() is true and LOG otherwise, rather than checking AmWalSenderProcess() or AmLogicalSlotSyncWorkerProcess(). This would also cover any future background processes that use logical decoding. Regards, -- Fujii Masao
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Adjust log level of logical decoding messages by context
- de74d1e9a545 19 (unreleased) landed
-
Reduce log level of some logical decoding messages from LOG to DEBUG1
- 21b018e7eab5 19 (unreleased) cited