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 1w220h-000okc-2l for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 07:05:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w220g-007y0Q-2v for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 07:05:07 +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 1w220g-007y0E-21 for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 07:05:07 +0000 Received: from mail-oo1-xc31.google.com ([2607:f8b0:4864:20::c31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w220f-00000000MK7-1jOj for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 07:05:06 +0000 Received: by mail-oo1-xc31.google.com with SMTP id 006d021491bc7-67bb4e8955aso2543169eaf.0 for ; Mon, 16 Mar 2026 00:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773644705; cv=none; d=google.com; s=arc-20240605; b=WLiYU3A7W7cqhlPgNX5HbK3RB9Xs/PYY3vUBh8B4z4J9SR70E3l6RS4Vw1SoMrAdoJ ptZxqkV8amgz1y3jmyKgd99lh8wWLBxIbQcg150QgdX975g1KjA8LJBjMwP4yXWSaPvz SPo0utGwshV/JhBB+dGwQcC6Hao4Hm9zTEPD3XleLD5nZvPj2XauTZGZBundG+geSdbA vu5B5nDdNiLz25dSyzYbKRcpNzIBh/p/7Preq1M3MZJ101q3ql+1awYGichR0VbmNqv1 V2ZIWjnd73585chiMmsQuq/TjtLP1ZrW3WOTtLpxZEpCVTr/Yfk/hwhWWtZ9bdTZyb1Z w8QA== 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=h31DJnJNpKA+B4twKOP4tPRGfwIKk3gNJy9HwLLmVE4=; fh=YQk9w/B3JifLGf0rczWbFfVVzo4lZ1000OPKjBbtauY=; b=ONhsTLQyXuSh6JJp4Obz0X1tULbO2vHHA76lPqCWEz/snOpdLUtRrwqvTHbvNg3cLO PXGKOr5RLRxo7+ruiGFwYJbKOLP+nm8sqxli8sJev7v45dpdYBHybb93Z54+oEXKZRoX PFaFv961otCKHu5Si+6y3kgH5GMeG/OLjXNACMgDjT665BYePrPaWQi6RvThxlYn3GT8 5lXpk+DKylNKcPWV0ZGTETPNsIW8y5pC+vaRQQk79ShhDGl8fyNMdaUQFxzmopvecN7Q cz/j/mONaq0hDw7xXzna+TotMWMsvLPQVWl4CjHc4Uddt5rYJyy9j/C3RTifkRA85Ay7 8IJg==; 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=1773644705; x=1774249505; 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=h31DJnJNpKA+B4twKOP4tPRGfwIKk3gNJy9HwLLmVE4=; b=Hw3te0kBw+UGKpntaMsDvwApKTnd4VubQfN9ndFcaZ/7Yv9/Ibja8zD7BuOehET4Aj LC7kK06WHN/KZJSTCvoBLDXDslb6kOmn8Hu/ZHyTlxE5yZuENUiFpNgGB0KmU0yhg4DA b8fd9eR0TX7Nzd5UT/tN/Ivkky0i7S//8VwIMEckwg+JhdxbEcWXPTvikhAlpJtqpLEl 1MnZvxpSPj7oaP8Gilk1CmlD+t92dtQ2MUwQhQY1AnL9H+XIIkiuA9ZD58tvI8QVDMzq y5Lc1RJMmidt3eSeRwf/Q6fEvYSzUWy1QKv7dNhTtoLNKSx0TRkcKoZuiLuZomgTa2xT N6rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773644705; x=1774249505; 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=h31DJnJNpKA+B4twKOP4tPRGfwIKk3gNJy9HwLLmVE4=; b=iRjSlWjcyrRdN7dVK08+beAu3aTZrJh40HmFKAuESs/c5+AL78mEuyTVmVWS+KeEkc UGYHv0Qtlk1VwDtESDZ7WNY5kmATGM/cjv5o32n/o2sL0ZwR5cwjeqyIXj/nYqW3/bHM kIUFdnILhFgbwpwP4Vna5TOX6dEsUDDwbNgtgWtFFDf/E6NGfcDmZHx6EAQbQe0sbMef Ng3/tQZB6fDZpustiJaMgYT5yC1Lj8L4sSckSHCDPKmljExrbVh2zuW8BUZtGfIei2cw khIoLMz8zOExkz5Vi4XcE3spiffHECunod4SVZ8NAxBExukbla8aN5Rm3dB1iILOIbNK Qk2w== X-Forwarded-Encrypted: i=1; AJvYcCVHYYrmMxlkGMgMppm9RMdf4D0JxXOFyzsN4rSN0n2kZd/ciOQwdOkIcO3Y09tJsggabdeL0l/eFpXoBVv5@lists.postgresql.org X-Gm-Message-State: AOJu0YwZtgsdBCU3w/el08J59BQTT3CIyKjT4eHomO0M3gBD5EQBqukt NYo0QK9mElOf5mxzK9T5n1iRoXkv3gmpKtWPYBE2FL9HE1RJBsjFyCNWLC3sPG9ivLIkgTQDOna Vr50hfkAt66lhf4F+YWKNOx+CkeC9F7c= X-Gm-Gg: ATEYQzwl1IJYQHjSG9+7dm9jEuuSI5FjiWyhdsqwU/4ZH+Cm6YzSqk9YcTT6eawxtxH 2x3tbvfvYfZy2ru5jkhRdr+jGedUEhdLkIatOiX0DFYUkL1pbT+3fuOlw3+SlRkRlZMAv1nWwSV RUZJe7xfnitmjK58QuuNww/IQnrZLbpinUxJCjQQiinBmtyJ/x69JV/5rWn3PmnbuAfHnynLJIp 33QSgpETTUePy4+KTzyS1w5obytbcotK/SVdVYQEaYAboqaqNpM8is/8S4Ef3ljM0ZY0WFe3IDK eZyuPWOGJWtbNJEMVOeT09QpuFZcAwTJ37wRweZyKYNRTrXAciePGnHN8LypjYg5Ubu8KzAoU/Q GxhqckRc7NuXzQOja+g/uWoItDeQ= X-Received: by 2002:a05:6820:1349:b0:67b:ba75:3ea2 with SMTP id 006d021491bc7-67bda98df47mr8223973eaf.15.1773644705123; Mon, 16 Mar 2026 00:05:05 -0700 (PDT) MIME-Version: 1.0 References: <20260204213032.15bab46b@ardentperf.com> <177304694613.1094603.10800724073727441272.pgcf@coridan.postgresql.org> <017AD77A-21B6-4B0A-8847-207914D53CE0@gmail.com> In-Reply-To: From: =?UTF-8?Q?H=C3=BCseyin_Demir?= Date: Mon, 16 Mar 2026 08:04:53 +0100 X-Gm-Features: AaiRm53wtgvBf9PmouaqJh2Ack3jDGBFY7amJmdMPqf4ckdXJklQjEjkKSL0bWw Message-ID: Subject: Re: client_connection_check_interval default value To: Fujii Masao Cc: Chao Li , pgsql-hackers@lists.postgresql.org 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 Hi, Fujii Masao , 13 Mar 2026 Cum, 13:36 tarihinde =C5=9Funu yazd=C4=B1: > > On Tue, Mar 10, 2026 at 10:42=E2=80=AFAM Chao Li = wrote: > > > > > > > > > On Mar 9, 2026, at 22:12, Fujii Masao wrote: > > > > > > On Mon, Mar 9, 2026 at 6:03=E2=80=AFPM H=C3=BCseyin Demir wrote: > > >> > > >> Hi Fujii, > > >> > > >> Thanks for the patch. The rate-limiting approach makes sense to me. = A couple of thoughts: > > >> > > >> 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_t= imeout to, say, 30s or 60s, they've already signaled they don't need freque= nt lock-wait feedback. Logging every 10s after a 60s deadlock_timeout feels= inconsistent with that intent. > > > > > > 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. > > > > > > 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. > > > > > > If there is a need to emit the message periodically, we could add tha= t > > > as a separate feature later so that it works independently of > > > the client_connection_check_interval setting. > > > > > > Thought? > > > > 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_connecti= on_check_interval is adjusted seems surprising. > > 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= . > The new v2 patch looks good to me. One open question from my side is should we include a test for this behaviour ? Because we mentioned adding a different GUC in the future to manage this rate-limiting approach. It can be useful in the future once we consider/re-visit this approach. If the tests and other future ideas can be developed later together we can consider adding tests later. Thanks for the patch again! Regards.