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 1vsdQW-00B3FL-1n for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Feb 2026 09:00: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 1vsdQV-00F5ao-0X for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Feb 2026 09:00:55 +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 1vsdQU-00F5ag-2k for pgsql-hackers@lists.postgresql.org; Wed, 18 Feb 2026 09:00:55 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vsdQS-00000001Byh-1o8C for pgsql-hackers@lists.postgresql.org; Wed, 18 Feb 2026 09:00:54 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4838c15e3cbso20122425e9.3 for ; Wed, 18 Feb 2026 01:00:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771405251; cv=none; d=google.com; s=arc-20240605; b=c+0P6i3iZvzYOKv64BGRB8sgLBfy0DGMyrJFwuOSzggJUJuoHUyYXuqmV58iaDspB7 txgh4noFLyV9ZBEG/oVvqczQJmmh2wg+8/+0yRsqpft55oV8Z1Qf4XFVuzUL9XV49bKp j1UiPbqJPZXb5fb47a0WELhuZP0+lnCWUe0hFvK5N507stfb2RlUl98SffoRhN0hzIl3 XHHFnA069+ly/L+27CAD3NBO8iCMLIMKug6mLUC06uMW/Dgb3ZfuCUVcLXUCOzLe8Men XGiokKjWObwy3DhyaWl0UbK++usRtHPmp87j4V0OmHTxMSDDxxeaRERGwcQRkySckVxd /U5w== 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=ifBNIIXPmsWKw55KJQ4CzmY/DIaXsJ1gfM1Xmb6A/vo=; fh=F+ENQpoexndcwXs/MGDQ25vnRqF/mobWulPPqsfO2uA=; b=bnB+kPHpiz1aMx+QZ+PVIZjgAdaq+L+uGVcuzKIMnxgEWiZFpZ+10qsmvL5r8/iC0Q WWgtCMCygqJMP8x2ntVh0Ge+V4dMi16BeOKe3ltcGYMM9iM0rhayrT0H+p+PG5sRr87g TUH6BQyABvBFFPRH9lhriOHqsW5AFGJxZKhlsrdoGR3uTvMgM9hzZ2wjjYbJBEOH04CI 6ucStT3YND6SDJHep7N2gEAnU149P1TpwmytF7lE552vbfTDzikRRyqCdSDIH+/3nQza 8WlpCZNlAGjy9F5nmjl5cxF/RLG+COdExS7bpjLk0rnGvrloO9n6XUPrzsC3b1CZxjyL iCPw==; 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=cybertec.at; s=google; t=1771405251; x=1772010051; 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=ifBNIIXPmsWKw55KJQ4CzmY/DIaXsJ1gfM1Xmb6A/vo=; b=TN7/w/20bvlKj2MTHtWMzEKmroe1hpYc1Dhxw8mtz+HKzo36y35lhXLHpvbNcYlB0n VB7C7kJDFm+Or0fW+huCRGmBM+sRk1Cqk3tjG4ufkaTPAqiVUiQStR5tHMg7k4q9R9dY sOssRfmICX0Cx2a1ClZ6xCSkH/H6QvmBlneldp0myMOiV0BnIhgHTEvSDW3A89HM1vxY ni4hBAmjUSfHTyyx1ZKayB0DB4A9NiUIyJRE5HOf5JMqGijDP8C8ob+Jo7dfYatP8jRf 4UdcBXap4yxpfjdvho17phg/F0S4XNGnRKpr9Fn8UyouUGxrMo3dGEN3e/f6Jh7E2e2V A0Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771405251; x=1772010051; 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=ifBNIIXPmsWKw55KJQ4CzmY/DIaXsJ1gfM1Xmb6A/vo=; b=P4GyNRh49XKj9M8G8eGPQ1OeZEWnYSoWxjCgLNqV1g5+bxxTT4fTRieuay2PRIoNNe BeiihVrh8o4dogEtlEzhJRvzh01zwqf3ewLlvR7Bmjlx9wTk9+BCTCelbyaPUIerozGe qIUcNeWxDcFGHN3wdppMOL3kxoo7kWw86l5YzwQTrEoHKGVazof+FXOyFDB7WPFYoUEx 0zqBnvpXzQNxybrJYFLWMXXeJxCKwTdYqx+UpsmI+ptArCVPO+apJDMcUTFnW3XYY7bu peRmd36ICaN7w4JTltfIjInf3p+cCplmzEnAYIF/14tiE0YcdEiBy2FWb3iHF4laKVY5 cN7g== X-Forwarded-Encrypted: i=1; AJvYcCVPcR3LpYyUIamZkv/U8iQX92QO6SCLtvuS4wZKh5qYKY+ntcylhAC5AtlLFio21G2o4UL39RPybEKhSXBX@lists.postgresql.org X-Gm-Message-State: AOJu0Yw+C/kABdqMI4YhuR6j8FpyZm2av7oztVXqF+LoBMdLVgICIZNs WX2AVVTA99WdNdQREyUqLfkcqgUlLCwd0cZeiIxaNSDSfaDfnyNAA5705Ve230KBI94/bqiuIZU qf4WGnvDapaR418kmpRNznCpO7/jLTw6xj+DPHelwJA== X-Gm-Gg: AZuq6aLgN8WaccMoYKHuRQDXdyHqI0h87Hyu7LN2UgzILN6o8n5bdZkntxL3+x6bB07 bLy66PomZQ/Nbvo7fiwlKdot7RFecbjahCYtlVgVrGCCBWmpiXwDPpVOgxJuR2hb5t9nspWllAy 5xd7kHN/lTRNMuN35pV/+faHF9r0AOzbO+qeu0aGJeg6knYk0trEjp3lYARI1RxsLLSSmRuCXth ZKIDSetV+dg538Wzck5Shv+GGy1HMQjGkxdsnQssJLTg1ikng1u7ImL7NFU5LnjEG11eAcYsQbJ SXyYqSEbqPxNNe3is8g= X-Received: by 2002:a05:6000:24c1:b0:435:b068:d3da with SMTP id ffacd0b85a97d-43796ab18ddmr31235327f8f.4.1771405251279; Wed, 18 Feb 2026 01:00:51 -0800 (PST) MIME-Version: 1.0 References: <20260204213032.15bab46b@ardentperf.com> <20260205150452.00006167@ardentperf.com> <1667818.1770336112@sss.pgh.pa.us> In-Reply-To: From: Ants Aasma Date: Wed, 18 Feb 2026 11:00:40 +0200 X-Gm-Features: AaiRm50n_xyH8bjk64YozAnCECjOH_cLk8fAGMi9IScAXWOGEIf6m4KaXm0ieYk Message-ID: Subject: Re: client_connection_check_interval default value To: Laurenz Albe Cc: Fujii Masao , Tom Lane , Jeremy Schneider , Jacob Champion , "pgsql-hackers@lists.postgresql.org" , Marat Buharov , Greg Sabino Mullane , Thomas Munro 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 Wed, 18 Feb 2026 at 10:03, Laurenz Albe wrote= : > On Wed, 2026-02-18 at 14:30 +0900, Fujii Masao wrote: > > On Fri, Feb 6, 2026 at 9:01=E2=80=AFAM Tom Lane wro= te: > > > > The issue is that backends blocked in ProcSleep() are woken up ever= y > > > > client_connection_check_interval and may emit a "still waiting" mes= sage > > > > 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 alre= ady been > > > > emitted during a call to ProcSleep(), and suppress further messages > > > > once it has been logged. > > > > > > Independently of what's the default, it seems like it'd be valuable t= o > > > 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. > > > > Attached is a patch that rate-limits the "still waiting on lock" messag= e > > to at most once every 10s. > > > > I chose 10s instead of the suggested 2s, since 2s felt too short. But w= e can > > discuss the appropriate interval and adjust it if needed. The value is > > currently hard-coded, as making it configurable does not seem necessary= . > > I think that 10 seconds is good. I think 10 seconds is way too small. Having one long locker blocking a couple hundred backends is something that happens somewhat regularly. A 10s interval would result in tens of "still waiting" per second. It will just make it harder to sift out what is actually going on between all the waiters squawking "are we there yet?" in a loop. I think something above 5 minutes would be more appropriate. Regards, Ants Aasma