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 1w8SfL-000YaU-1E for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 00:45:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8SfK-00936X-0W for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 00:45:38 +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 1w8SfJ-00936O-2b for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 00:45:38 +0000 Received: from mail-oa1-x30.google.com ([2001:4860:4864:20::30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w8SfH-00000000I7L-19xP for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 00:45:37 +0000 Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-40ee9b945d5so1179912fac.0 for ; Thu, 02 Apr 2026 17:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775177133; cv=none; d=google.com; s=arc-20240605; b=UITbh3vCPPkUPHedBMvl9Elb0CDK7ThN4NPK04semibGdmR7bOqmU+wg6CpfzPsKJO BwnURJHBZL8KzCPI0UsaEmdfhAfDDGICNG2oHYH/nxjS38iJN5wa8T0wO3TdPRd9n791 d5hubMmcqa+uCx9c8s8jZEqZ+f1rH7TbesdOs9vUMMv5UH7PeihVnrguUSvf1uPbYv03 bP1EAbb0PXhwLFfMBggvlDy6mfrnWYkhInsKEs1F+9G4EyMxhMCCjx+lB/H+jRErPuea PxudQ3lRFeVjumBAJuOJV38FXZpi0qFuN2VsdxkmOMzuh4oF6YpeMmq4A/uDKloTjvic 4plw== 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=U9r+1yX8Mjz2R5ZMQzSWKKhjK9XW/JHB2AXyYUJSRQQ=; fh=mPihfH1+KKpyCbicZiU7TIj0w3wGjWZV+Jjft+Yo2Cw=; b=h0HhJI4ls3FeRLsWgdb1BtqFpfiF4vlBsYBIlofRlJF7DJ7GtKHeactbK5WsPU5Er+ D4Z4g1oI4N7SHs5IctY1f6laxyJ8riERiTCFrUlbG87QeY/XC7h8aRSzMMTaK78LgsXc zGQZ262Y3bvb0muaZtdHcu11bF1crbplaRW8/ItZId8IaVMzc9g7VIlQGUd6CQTfEwPf meH9+9etWXdBRnnGGm7K43CtmVFpWGbr2QH7ForIc123Fo4XBnmiYYQtm3ZMlNPz8+RW NXzXqmEI+rYPvKB2f0+c57AFh9GDqIDzOwZDiMarfKTsIMB8xbLyZIDuabSvuK5961Zz P6cg==; 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=20251104; t=1775177133; x=1775781933; 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=U9r+1yX8Mjz2R5ZMQzSWKKhjK9XW/JHB2AXyYUJSRQQ=; b=SFxG0R+pr3dixBTMQSCi/S4QyEVqKXakVLMyHKqAC9nujbpFewnpI2+hl6UKTd7Ah6 emxpAdegeOVJ7EzkUjAha/KA0pwPwqsQKBBsZjAa7LYW+h7JXimnfkAtN5NDkdfY2H5n OwyNgHFbbUbxx7gwqakJrPXf80YOHowQyPefGbDvAzI8pA/tBDJJZmir1dNHrwXcYEFo 3dAJY0cS5vSvi/0P4Kbl4OMQfqWypgL6Dqb8isYfEMMgOMPz5Jv/6KLNLxOsZjKOPYTB TKLdbIsRM3EcjAxDSA1nw18zPS4bPu1OMej+/NspuwSnXrRI1vuoxJCRBx2EkAeGW9Xe pLew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775177133; x=1775781933; 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=U9r+1yX8Mjz2R5ZMQzSWKKhjK9XW/JHB2AXyYUJSRQQ=; b=EMwA/bssR5c/qGH0omnAF4z5pGEglbSCiHTmID1UNloDsgU5130UtDk8D1n9xMGahp 2fy60bw0/AEN0XmgoO1b35qCRV4SKpucp1nxHI+3V4wWI9P4WNham/3GANWfTkF7/9ag pKmdftZbbkL1CSk/EaCEc9etAtHPQ5ASCcZu1ZllLLXgEkn5gTP4ghOUv2s/cFAeyUzi myc2O1HYqo1OX4rBtSqUrMvvv1PVL4YCWdb02Z5XIlMZq5SGDkYozYRnOZ14btkhVBrP nSk+zrmFvJc6yY9DN22eWusWSJ1BMWjFakPZ7w8Y4jFJJRktEDka7sfjnBOgFyeP7AaL oprw== X-Forwarded-Encrypted: i=1; AJvYcCW1zsoJfQVj3DaX2VxprzeWGjycT8vFuNyx2Z3Q5XfDzdSSil9Y4p3xlLQY5WpDZB32jpIcZpMEB6tzit/y@lists.postgresql.org X-Gm-Message-State: AOJu0YyqOdnYUGzkEJ1t7nXgoE0d4ZUJUEbaH2kBvEN5enBfAo7zcqWy nJIsKbnYREoTYbIZHOGoiN860j8VeizUbm+10wVLwAlwFn1aC4wY8uoFdqAJVHZzNcZI4dXUNTB Bmq2FxV9WXAo7aqEfB3fbeBlLFEJfUOc= X-Gm-Gg: ATEYQzzxwqIYQaVoqBCfXoArKVElIyOR0X0ZlhJR9It6D+dST5THh8r6u2t9EX/PD1d 0p2PKWgsmoj3V8sP2qI6Ed6rg7ztVZwUUzeQ07DZtKbjhl9zhyAA+OBbN2pVa/FeSM+sgjVKtZA SaYQ3DHG7uLFnvqluKRddtc8LG5zbe+5RD0t4TtPlgXc8nkxydVLn66Thhz2OQErL0hie23/IzV Z1qkWvX8vSv60yScRdE2SPTOxymSPOqysF1Aiq6/1ldwZnuSpKSmLQ7KTU7U3WOv1FP6mIy2X7u wz7wdPWKF/3sHu4v6jNO8QSJGytPv+2w3vPSVEL4IQ== X-Received: by 2002:a4a:e902:0:b0:681:14c6:b321 with SMTP id 006d021491bc7-6821d83d45emr649917eaf.3.1775177133399; Thu, 02 Apr 2026 17:45:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fujii Masao Date: Fri, 3 Apr 2026 09:45:20 +0900 X-Gm-Features: AQROBzBU1kpeTTUzQDapNBkTo3swXajRcQdZT5b6Cdms30p3jzdJ2yGt20KQQ4U Message-ID: Subject: Re: pgsql: Reduce log level of some logical decoding messages from LOG to D To: Robert Haas Cc: Fujii Masao , 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 Fri, Apr 3, 2026 at 4:56=E2=80=AFAM Robert Haas = wrote: > > On Wed, Apr 1, 2026 at 2:44=E2=80=AFAM Fujii Masao = 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. Thanks for sharing your thoughts! > 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. Yes, I'm proposing a new GUC, trace_logical_decoding_messages, as discussed in [1]. I was thinking this GUC would be sufficient for this purpose. With = this GUC, the messages changed to DEBUG1 by this commit could be output at LOG by default, preserving previous behavior. On the other hand, users who want less noise could then adjust the setting to suppress those messages. This w= ay, it would cover both use cases: those who want LOG-level messages for debugg= ing, and those who prefer to suppress them. But maybe I'm missing something. It would be helpful to understand what iss= ues you see with this approach. > 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. You are suggesting something like that logical walsender and pg_logical_slot_get_changes() should log at LOG, while the slotsync worker should use DEBUG? Sorry, I may be misunderstanding, since the slotsync work= er can also use logical decoding mechanism internally. Could you clarify what = you have in mind by "peeking at a slot or similar"? Regards, [1] https://postgr.es/m/CAHGQGwFB+hC97SHDpn1vOHHOq9uM5OZZmt50j7v6Z1JUNtH5zQ= @mail.gmail.com --=20 Fujii Masao