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 1w2idh-000XEk-00 for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 04:36:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2idf-007Knn-2v for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 04:36:11 +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 1w2idf-007Knc-1e for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2026 04:36:11 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2idc-00000000rrF-1N2t for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2026 04:36:11 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-43b3d9d0695so446175f8f.0 for ; Tue, 17 Mar 2026 21:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773808566; x=1774413366; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=evI2l/Zw57UKxhxVtodlt7XtY5dN0LtTr+wkOKJyOzQ=; b=aUIwlhWwghGUmgsStinnvC15WYRqj/qJZzlm88EERb9hMj7+EHAgBbXP2VWOhev5P3 ok0w2TPg/jVbJQyUlm6QyWPA/Y+ORq6YO3ugjtng8kJ8o9AP9sAhccr43cU8kJ8ygOX5 QuuXDHhHdN+ZIwoKOT/zf5rSdCuknDLCwhEcOhJuE/bFNG/r6SRQUTris9bDyLSKGBV8 +lTZ/Za/f/Z2JaJAEKTuZPuMQ7vdjXdi4jMF4ZONGjbN1jK0/qxCt6ZTc18cWait34Bz 6rtuJlWikIoph4lgPO3sgNGImRFDEbTw1dreZYS84UnUvKTQKLh3A6fLkJo3pE1wlJAI saGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773808566; x=1774413366; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=evI2l/Zw57UKxhxVtodlt7XtY5dN0LtTr+wkOKJyOzQ=; b=S/TELJ9I6KxqjnwQT/6HPl7Lflhc1F/Te7n1jzbzbcZ9PL+/+PuF2N3HkPr6Qkbahe D7S9c21UqiNHD1MdNtkAz1iH1aXpRzIe5+UKaOYwTriNdlbcYgCRsBImlD6Kvp8suzzL 5EbkX6JIDT8rcXQKru7T9rciVUgszCl4JSlTDZKDuA1c5NrSzOCdh/57y51PRbvXX0mT 9Ak+6jViiQZvsl3HyxqCopgr3WHGI9Jb5DOdM3ooEPO797EUxJ8z9zJulvg15Ttyi+9d t6mNyBZjFwJwinszBO4c4iqkabcyqkmEY082rOU85qE+98eJDowEUh7StnvicwdhjBuc Z9qw== X-Forwarded-Encrypted: i=1; AJvYcCW0kwCeVR715oME8Wl+jU84CGJk0a46+K/ZbgagZBYDCPYv+QZNUErrlO0wDZUkJg1wy5FuLu+c+Fmb+WGz@lists.postgresql.org X-Gm-Message-State: AOJu0YwDUfZYslKqHO+QcxAgLt0szLI7t3i70kKAwgVqG0jdFtGn+nPT /diq3ET4xKlzo5Uzqz1uZSIAXRyC/xAwULq45mehHW9SpJ+zm3+XUWaI X-Gm-Gg: ATEYQzy8T1TtkffQTTGT9G8MSexV2lFc3PfiOnqY4r0StIbnlgKBFLK7rRJ5aukSvR0 JhpkbWxCzUxHOE3safIycTAb8gIih88R1nJXmDylG9g0xUYd5ua3GHiQyPBe3u/8N2SmkRXfE5v E3oDoCJixcWxfQhR/5WKq86Wvstp6eU2+//zzJNuHogAA8z4s5HBNUhlcoUBvvSCJAnlvU7/XVm j4pBpxeKWx6K30zGYL5feND13JimpgNoCyDI2bpyMpMmqtHoO0rAVWsl+68wFsREZEAutMPDNOP knLQiC10lWyXKZcPUxr7Zn05inAGweKU+MO0AAnz0zPHQFujNuVRQkNRoi9+lyHWrwCjfIPb8VY 6uylXN8MBL8+GlDWQIyqSddb0BcvqPm4B3Xunsef8M05quM+qS9Tb9OTZvHWjWM3a3AQCIuO+G8 /tcpQRU3Z5FPPBujaqLR/zmkygTTC1Sk8+0rnzywv0KOMKzJ9XAw8hfn2PBk+yUOTPunORlYj/4 uj1c/CEqsFKMXH0Qb7/xT7oL1LJr+Og0lX7qvnVD3widWekQVsYknQeOg== X-Received: by 2002:a05:6000:26c7:b0:439:c1a7:9dee with SMTP id ffacd0b85a97d-43b497bfca2mr10606499f8f.0.1773808566266; Tue, 17 Mar 2026 21:36:06 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b51892234sm4492379f8f.24.2026.03.17.21.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Mar 2026 21:36:05 -0700 (PDT) Date: Wed, 18 Mar 2026 04:36:04 +0000 From: Bertrand Drouvot To: Andres Freund Cc: Michael Paquier , Jeff Davis , Greg Sabino Mullane , pgsql-hackers@lists.postgresql.org Subject: Re: Adding locks statistics Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nK2xgkLTeiiswcxd" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --nK2xgkLTeiiswcxd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On Fri, Feb 27, 2026 at 05:14:31AM +0000, Bertrand Drouvot wrote: > Hi, > > On Fri, Feb 20, 2026 at 05:26:37PM +0000, Bertrand Drouvot wrote: > > Hi, > > > > On Fri, Feb 20, 2026 at 11:02:49AM -0500, Andres Freund wrote: > > > Hi, > > > > > > How could a user benefit from that split? To me this is pointless number > > > gathering that wastes resources and confuses users. > > > > I was thinking that could be useful to know the distribution between "long" waits > > (greater than the deadlock timeout) among all the waits. > > > > If the vast majority are long waits that may indicate that the application is > > misbehaving (as opposed to a tiny percentage of long waits). > > > > I was also thinking to bring those stats per-backend (as a next step) and that > > could also probably be more useful (distribution per host for example, thanks to > > joining with pg_stat_activity). > > As it seems that I'm the only one thinking that this split could be useful, I'm > removing it in the attached. We can still split later on if we have requests from > the field. > > So, we're back to what we were discussing before the split. As in v7, 0003 is > adding the new GUC. So that we can see what having a new GUC implies in ProcSleep() > and we can just get rid of 0003 if we think the GUC is not worth the extra complexity > (I don't have a strong opinion on it but tempted to think that the extra GUC is > not worth it). PFA, a rebase due to fd6ecbfa75ff. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com --nK2xgkLTeiiswcxd Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v9-0001-Add-lock-statistics.patch"