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 1w1wtW-000kIq-2E for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 01:37:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w1wtV-006nzL-1B for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 01:37:22 +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 1w1wtV-006nzD-05 for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 01:37:21 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w1wtS-00000000Lb2-2dM8 for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 01:37:21 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2ae5636ab04so45305325ad.3 for ; Sun, 15 Mar 2026 18:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773625036; x=1774229836; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=r2LslljBEcUgICucjor+KRJE3Plv4w4pW18fS+sjjI4=; b=MczjL5DKwEFROuRsaMChh4spm9o+Qxip68/hYk9nz3BUYSQ1yl/YDPx8RTCJjQ40Rc +m4dVaiLb8v3B8arWfUNlRKSpODpQNY66ThMK59PvpqKags0j5fiWYLjdS1mxx4FVqWi F4l893r4oIGLI7cjup9p2eSCvZ3HOIUhbo5NQkOIHGIIRxSmg/KR85cZ3FvLBQqZIPm5 f684kiRVY20bQ5UFWmdedQSzIaz4l0TGHEh3D4n6nyENJdTA1KqrkpZnEJIajqoBFoEZ rVDX7jD9H1OX73vste5IWV6eCPDJ5s0z23YNMQGpMUAovvzr1iaDJ22tfqC+jEcyoObD 7IYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773625036; x=1774229836; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=r2LslljBEcUgICucjor+KRJE3Plv4w4pW18fS+sjjI4=; b=AUJE/lHVswx4F1TGww5Y96Jfk+BZiTtO/U2gdDHmIDoSyob3uGWmVmW/eThjWoBY7o QRW2L75yM9A0A25D7QLfuPQ4jHkjRydDtZGhkJsmA6tuwjTh8xmfyLtpvlKogbswDZ9t q4tNfI6ha9FXrrCNo5PO6cjZHHMxObpPbvQVUYoL032BfUPBxeaY0tZ5OioAFvLVi4ij cL7ojqEs04fwh7KXNWLwpQuDo1lg8PRu+87Gkk7n2S5b9V1pE77PKrE7xfxZUNqAV6cr YX7lrez0jFsSgJ09v5KkGde9IBNtQwjcUNeEsX3Qha1vXjCxF+eY0EWRe9PRRDDbF26T EaEw== X-Forwarded-Encrypted: i=1; AJvYcCXc+v4gqBwMjAO7zgLlNMwgWRZ3JTFeyIUoPYT0rvrrwZrAvDQUmRyYg8klStF+9lw2q8eSSyIdowEu/dun@lists.postgresql.org X-Gm-Message-State: AOJu0YycfRExPAeS2dJWEMZ6ahGgg3hs4hjaTGKZMxNT99vlert54Hgv 3jmNJhHK0RrhOVCLYseHne2ZOpm3+sWj0Af8QXvxlaDtWzODmaBpydlm X-Gm-Gg: ATEYQzxRuzhp6+hWxPfKJLTnsA2bfB1aGhMqRhbGmgZNsE7hd5EyQpdxjB9pqfBpVqR Exy891whSRH8Nm94F7lbAdLJ+R+x+6NtoVRcjDKLp5UOJOeyYSQFVy0ygKUVi/d35Se3TR4XMKf L0pGwzAPOZI+8L31z+QXJ7FtmgTURcdfbUHp7OOAWonfqGNjmTRsCAsLGhmHrY/Enbdh8JfxnbN 45XRyffYHGWAsPNlGPqa1T0gJEREcdl6n9mEwSUf8TdzvGFqt5LMLpW7hk9acDHdc1ohdG8vQLr i7ABPNB219btLukZKTZoiW286uVBsuI/FL6WoJsMzv64a9XPw+rSdmybKJWYp+sWYBxHl0uf0jS 2LvsR6MOigURgcae4YDrXmm4Z1cO1cMIVeQ/MB+oujbvdKUs62Jkkje9hJxFYpl88d0HSfZLwKM 8mbw4KPM+mP2ZeFpC/szx3gCKB2D7okUk= X-Received: by 2002:a17:902:c94a:b0:2b0:5795:9eb1 with SMTP id d9443c01a7336-2b05795a25emr18003135ad.0.1773625036394; Sun, 15 Mar 2026 18:37:16 -0700 (PDT) Received: from smtpclient.apple ([45.32.121.103]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b048527a19sm48684715ad.7.2026.03.15.18.37.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2026 18:37:15 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: client_connection_check_interval default value From: Chao Li In-Reply-To: Date: Mon, 16 Mar 2026 09:36:36 +0800 Cc: =?utf-8?Q?H=C3=BCseyin_Demir?= , pgsql-hackers@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20260204213032.15bab46b@ardentperf.com> <177304694613.1094603.10800724073727441272.pgcf@coridan.postgresql.org> <017AD77A-21B6-4B0A-8847-207914D53CE0@gmail.com> To: Fujii Masao X-Mailer: Apple Mail (2.3864.400.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Mar 13, 2026, at 20:36, Fujii Masao wrote: >=20 > On Tue, Mar 10, 2026 at 10:42=E2=80=AFAM Chao Li = wrote: >>=20 >>=20 >>=20 >>> On Mar 9, 2026, at 22:12, Fujii Masao wrote: >>>=20 >>> On Mon, Mar 9, 2026 at 6:03=E2=80=AFPM H=C3=BCseyin Demir = wrote: >>>>=20 >>>> Hi Fujii, >>>>=20 >>>> Thanks for the patch. The rate-limiting approach makes sense to me. = A couple of thoughts: >>>>=20 >>>> 1) I think Chao Li's suggestion of using max(10s, deadlock_timeout) = as the rate limit interval is worth adopting. If someone has set = deadlock_timeout to, say, 30s or 60s, they've already signaled they = don't need frequent lock-wait feedback. Logging every 10s after a 60s = deadlock_timeout feels inconsistent with that intent. >>>=20 >>> Or perhaps they expect the log message to be emitted only once, >>> just after deadlock_timeout, similar to the current behavior when >>> client_connection_check_interval is not set, I guess. >>>=20 >>> I'm now starting thinking it might be better to preserve the = existing >>> behavior (emitting the message once per wait) regardless of whether >>> client_connection_check_interval is set, and implement that first. >>>=20 >>> If there is a need to emit the message periodically, we could add = that >>> as a separate feature later so that it works independently of >>> the client_connection_check_interval setting. >>>=20 >>> Thought? >>=20 >> Yeah, IMHO, preserving the existing behavior is preferable. = Logically, client_connection_check_interval and log_lock_waitsbelong to = two different departments. Even though they cross paths at the = implementation level today, having the behavior of log_lock_waits change = just because client_connection_check_interval is adjusted seems = surprising. >=20 > So, attached is a patch that ensures the "still waiting on lock" = message is > reported at most once during a lock wait, even if the wait is = interrupted. >=20 > Regards, >=20 > --=20 > Fujii Masao > V2 overall looks good to me. A small comment is about the variable name logged_lock_waits that sounds = like =E2=80=9Ccount of waits=E2=80=9D, I would suggest = =E2=80=9Clock_wait_logged=E2=80=9D. But I see that the name follows the = naming convention of the existing variable logged_recovery_conflict, so = maybe just rename to logged_lock_wait (remove the =E2=80=9Cs=E2=80=9D). Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/