Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w4hSb-002T1D-1A for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 15:44:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w4hSZ-00177q-2S for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2026 15:44:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w4hSZ-00177i-1Y for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2026 15:44:55 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w4hSX-00000000iVy-1Od5 for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2026 15:44:55 +0000 Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-7d8b285601bso1397741a34.2 for ; Mon, 23 Mar 2026 08:44:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774280692; cv=none; d=google.com; s=arc-20240605; b=M+5SC9jr0ptWwZKHSlwSfprVS5TfMpCp2pkinL10QkqmlkH5vFcXstIXB4FK0UekDl qwkU5cxpizbiy97FNLvhy+7NCpAEI6rv/zWTDL4jWVl2ne/YPAi01xSGrChA6H/RNX9q EulBf9Nd00kAq9/NS247oF1Gxqp36O/ck39tl0RsddPcoa2MSJb5kgi6HpbEMBDB1m0V vV2tuq5uX2K+Jy1cs2gI13JjZ7R8BPfk4WKUs7p63iL+IQBuj9LQ/98YJk08WKU9aKpx 0cXIV+u0uVRfsI2GK0jjE1BE3mT8q8RSN7yAWQBYCI3jjhAC86QTIELb0vzyALQJYWEs HIcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GXqgl0mUIBISVCQtzF7HjlBC4lH1N2uBKokY5YAjFL4=; fh=rxy+4R5RAfz27w/g7ZsxrTiDybElymesvHD6KaufTT8=; b=VauFQmKYx0TNB4CPVqFYcHEzgUIN+53osaM2P/+WY7QNeO2fTrqRanJgGGESamUkMP aCUwxdthm+bIXD2RIkfypL88YsaUkdbZTTFZxmFffaXv1y4r5DPGQdlGg5y5FvT2q/Tu dVxBPKIUf4gBOsqXhpPDsxJMMoIbH15R0PoAn8hipgc5G3bQEgz5BSnOddlzhvcgqCuj gl9o4S4Hoo77qw9uG0cH847F9FhZCNg6QYWz1FXvX86zSIvR5bVavxnmnPIPs5j3W1xp juQ7tLFBR1GIXedP9LR469vbOT/7ap+PQieP9sXdLT96yHkENeann4HQxQpvxCOp1Zqd x1tA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1774280692; x=1774885492; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GXqgl0mUIBISVCQtzF7HjlBC4lH1N2uBKokY5YAjFL4=; b=J+yUD4X64V9+kAfZljfRGxwDHDgNJNmqs3pDDYIPwGdXmJ/pDj4aedTDU7oS2HbFWN SKXRH+UZFTNYIMhjf8gBfs742U/5MlQupQB/WxpZwokRm9zds+6xq9gLi+ENifMbv1UT uYIc+CzmRTZFCUfxyn6oWi3ujyJPzuQHfNkOjkWGZJ0H4oEwq8m0DRKAA/QXvq0irO0R KbiSgl/FYW5gaPlcuX59Tnf8cMJMx9Lu1Za+3wJyPbZDQh/cz5m5os86OvadEwwXuQEc HB9v+e4Obc/a3VUKxvd85aZgDD62dDAaontDDcOnKcAJTxUxNkTLQ1GaLPx1gpEODEqe DtDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774280692; x=1774885492; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=GXqgl0mUIBISVCQtzF7HjlBC4lH1N2uBKokY5YAjFL4=; b=Mugwt4/yQRlhKB+CHy4El9b0lEW7RRDPKbmsnvtm1Y40TS0zfICMhK4wWXOjBjp8rk C9OdBoMrFFGn0YfPyukZwrf1XHhzij/Y6iKzWZWfhPvF/kra8cQgWx4vMmH6FT6yJPeW w2kym+Zg94Sa/tNWjfpe2i/qOyRfSABD8lOhhUle76rh0Mo1JbHdqGKO7ay7UuZcllkT +7BLj6+uC414wtJuVko6+VYvy4228Bx20lOFuECsSSQfofVBVWez0skBkF7Abu+ah3/K GC90CNoMRGtoWCUiTFXCHVlFPx2Yronqj6TmKNARZ0eyB6qlULKzlKwD7e9qbJ8Jx698 cIcQ== X-Gm-Message-State: AOJu0YzH+N9ZgwKdvhGdWIZr9Hz9qljaHpYpkJE6vp25X/zhEIwpNzwS DKGXrWWdLrzpaL28JJB5Km8UjyPaHY1U/7pQYKDlH1tWnvCxJeS0oeB1d6yfcNCxc60aUJM2ZlV IIgap8GpPwdMUajukd5s9AeS3OgxyfeQ= X-Gm-Gg: ATEYQzwUYXHfgXs7MnXPH5zifrdENEvMnwJJuD4tNK8He5hjrlKBn2SC+piP1PQ655a IoP0JCGO5mNuP5IuRQ3IeNtEjXMPVWbrzkBJAsFHtjXVLhXUZLNSpjFBJmUBQ3gcT/QCuyIvUM2 lfSk1Ap8pOi4jiDbg4WOc9+db9rFjMLfuu67WdZEPrbYs2dXzIGfeqtNEMKeOMlaT7vQ8pHrS8L VKpS0qKgv9/XkuUMLv5cOpXQBxyVUvfQV2NTwSGrbwtseaJTOwIirpoU7UJ+39vRuy3HUd78IHY fDhLQLpwGoIxM5LjiF7+uDZCKDGAvCaEO6DCTCuI X-Received: by 2002:a05:6820:c2cc:20b0:67c:2d5e:e9d9 with SMTP id 006d021491bc7-67c2d5eed85mr5374621eaf.37.1774280691816; Mon, 23 Mar 2026 08:44:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fujii Masao Date: Tue, 24 Mar 2026 00:44:37 +0900 X-Gm-Features: AQROBzC78s3_bzwuuw1joL7wPxvXgC-qY8IUFAQzhBhM9GuCj40zxQ6YNlcSk20 Message-ID: Subject: Re: Reduce log level of some logical decoding messages to DEBUG1 To: Bharath Rupireddy Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Mar 23, 2026 at 10:53=E2=80=AFPM Bharath Rupireddy wrote: > > Hi, > > On Mon, Mar 23, 2026 at 1:23=E2=80=AFAM Fujii Masao wrote: > > > > In logical decoding, messages like the following are currently logged a= t > > LOG level: > > > > LOG: starting logical decoding for slot "myslot" > > DETAIL: Streaming transactions committing after 0/030872C0, > > reading WAL from 0/03087288. > > STATEMENT: ... > > LOG: logical decoding found consistent point at 0/03087288 > > DETAIL: There are no running transactions. > > STATEMENT: ... > > > > These can be useful for debugging, but DBAs are typically not intereste= d in > > them. They can also be emitted frequently, for example, on each call to > > functions like pg_logical_slot_peek_binary_changes() or > > pg_replication_slot_advance() etc. When such functions are called repea= tedly, > > the logs can quickly become noisy. > > 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? > > The slotsync worker can also generate these messages periodically. Due = to > > the issue discussed at [1], this can currently happen as often as every= 200ms > > (which should be fixed separately). Even without that issue, these mess= ages > > would be still emitted regularly. > > > > Given that these are mostly developer-oriented messages, logging them a= t > > LOG level seems too verbose. I'm proposing to reduce their level to DEB= UG1. > > A patch is attached. > > > > Alternatively, if we want to keep them at LOG by default, we could intr= oduce > > a GUC like trace_logical_decoding_messages, similar to > > the old trace_recovery_messages, to control their verbosity independent= ly > > of log_min_messages. > > > > Thought? > > 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 DEBUG= 1. With the recent extension to log_min_messages (commit 38e0190ced7), we can enable them just for walsender (e.g., log_min_messages =3D 'warning,walsender:debug1'). Regards, --=20 Fujii Masao