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 1vulUv-005JJi-32 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Feb 2026 06:02:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vulUu-00HEgy-2r for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Feb 2026 06:02:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vulUu-00HEgp-1v for pgsql-hackers@lists.postgresql.org; Tue, 24 Feb 2026 06:02:16 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vulUq-00000000uhj-3rQU for pgsql-hackers@lists.postgresql.org; Tue, 24 Feb 2026 06:02:15 +0000 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-c6e734ba92bso2524547a12.3 for ; Mon, 23 Feb 2026 22:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771912933; x=1772517733; 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=p1tYmUaDCgvSRx5o4S6TqwCukHiUE7aQQeVEKtZ33ic=; b=DEExgch4TmjPVqx6lmN7zAWftTSfu9fAKPZzB/Ae2NmXuiKaEYqj6tHzzB7CviFqmw VHfGCdjnu6v7/Zm7tbxKcsCmR6SjHeu0Ab5ULpCX9o4XLV7PdX8XeDKqCEMVcm34JTPF K6c6iZUdO0yx6D0ZUrtGdDa69gV3Rb2g717xEozagCXvCPq4uLkcf5Urce97b8y5xcdi OzsCjI3uqUuMNoNsNbS1zqPfP4EdQZOuD55mC4c81KkjhlfjhytDxogQWsf44dHZPkxG MXMfx4Me7LW98XNV1BGyDlYlq0EI7b7mQOkiK+eXupxRp6WmGFb6By+zT0lqQ2Iz43VV Y6Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771912933; x=1772517733; 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=p1tYmUaDCgvSRx5o4S6TqwCukHiUE7aQQeVEKtZ33ic=; b=GltVEeAtnqE+2ZRpva4+fE5qHiOXyZJeSuu7FX1GybOJyAhcchUwHIDYutQdQzN+iz 9dUHkNguiV5LiMu7A2tOJAXwW47DFkwAjDlCzt3CIbESV9vK6Be+hqE1u/KROeUakxxF Y26xxPyVlNMMz5HSRqGRgTfS7FkV4+fU8D+5Nmj4g8QDn2eqpwoDDYCxkg4xtZ1CNEGG 0jR3mJNeqUfZ9F4u+wD2lQDGGaqr8Tqx1Nyv0Tj/Yfu5OVDY27r7Rjyqy2FAUK2Pn8DS wGIMu3SE3pMy0ICYxUe8gZL5MSqvOFWdeSxTmIZgsggrVx/es8fabcDoffeJvCKGvYeJ 4SSQ== X-Forwarded-Encrypted: i=1; AJvYcCVNSvGry+Lce7lT07S2oBduXYTQ1Y5FBmRVTKol07WNwmHYl3aTEZ5+ePDWMIVlZOtmxRY71/NOO2pcuvnO@lists.postgresql.org X-Gm-Message-State: AOJu0YxDeXHhMmQBJ13E4w0dFPXBq9dq7Pdv9lVj3Wo2jeUcGiBGPxLQ dowroaTnAL/rXJNLrlO6e/Y6EohM7dndBNQyZpVViIMvr2sZaWuSOuK8 X-Gm-Gg: ATEYQzxEXaCaEiTAA9CKmqCsZ4/druVwL95z/PuEIqEqebo+ohYadabB44KPO360wuQ 01gPXSvnzP3ShRVEoREyUInKKuE4k+S3yuxH3kuq5nurayrgGEKyDSlgvC+yyo+acWAmkLMmOng /SHeCPcTSTs1lg0UXmNamPewYILnqE80EFHVOutVpKrbh1cOD4tX8jYHr7/uYMdqBVRx+XeSgd/ IAzbeyBqenfX/+IURc49px0fg6FPkQNgzcXKrAjpYNuNooB2ECc9+uC3CRDQi4F7MkVHYfrm1hU urctSSx4f6S4HHqZy2jaL8v1w6aCA8y1en6x9PF2dBq7IBOhdWIRg/GW2KEsPx/+R+pSS+cSpK0 djl/lOmCSNo38BLF6Ojecqgu0ixP4re64dSd9kxIJWCt7I8XdTMft8sDRZcM622UXejvlf0Rh03 fMN7pRNfGVZtezdDSAFTcPwrk0ZJsTJA== X-Received: by 2002:a17:90b:562d:b0:356:5b3d:2249 with SMTP id 98e67ed59e1d1-358ae8f0f53mr9720247a91.32.1771912933158; Mon, 23 Feb 2026 22:02:13 -0800 (PST) Received: from smtpclient.apple ([203.10.98.27]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3589d8e3dc5sm11948556a91.14.2026.02.23.22.02.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2026 22:02:12 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.300.41.1.7\)) Subject: Re: client_connection_check_interval default value From: Chao Li In-Reply-To: Date: Tue, 24 Feb 2026 14:01:36 +0800 Cc: Tom Lane , Jeremy Schneider , Jacob Champion , "pgsql-hackers@lists.postgresql.org" , Marat Buharov , Greg Sabino Mullane , Thomas Munro Content-Transfer-Encoding: quoted-printable Message-Id: References: <20260204213032.15bab46b@ardentperf.com> <20260205150452.00006167@ardentperf.com> <1667818.1770336112@sss.pgh.pa.us> To: Fujii Masao X-Mailer: Apple Mail (2.3864.300.41.1.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Feb 18, 2026, at 13:30, Fujii Masao wrote: >=20 > On Fri, Feb 6, 2026 at 9:01=E2=80=AFAM Tom Lane = wrote: >>> The issue is that backends blocked in ProcSleep() are woken up every >>> client_connection_check_interval and may emit a "still waiting" = message >>> each time if log_lock_waits is enabled. To mitigate this, just one = idea is >>> to add a flag to track whether the "still waiting" message has = already been >>> emitted during a call to ProcSleep(), and suppress further messages >>> once it has been logged. >>=20 >> Independently of what's the default, it seems like it'd be valuable = to >> make that interaction better. I think it is reasonable to keep on >> emitting "still waiting" every so often, but we could probably >> rate-limit that to a lot less than every 2 seconds. >=20 > Attached is a patch that rate-limits the "still waiting on lock" = message > to at most once every 10s. >=20 > I chose 10s instead of the suggested 2s, since 2s felt too short. But = we can > discuss the appropriate interval and adjust it if needed. The value is > currently hard-coded, as making it configurable does not seem = necessary. >=20 > Thoughts? >=20 > --=20 > Fujii Masao > I feel 10 seconds is good. The other thinking is that, the message will only be printed after the = first deadlock check is fired. So, if someone sets deadlock_timeout to a = large value, say 30 or 60 seconds, then any waiting log would already be = very delayed. In that case, the user might not want to log more often = than deadlock checks anyway. =46rom this perspective, the rate limit = timeout could be max(10s, deadlock_timeout). Anyway, this is not a = strong opinion. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/