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.94.2) (envelope-from ) id 1um22T-008rEW-D0 for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Aug 2025 03:20:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1um22R-00BY4l-Of for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Aug 2025 03:20:31 +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.94.2) (envelope-from ) id 1um22R-00BY4c-Ed for pgsql-hackers@lists.postgresql.org; Wed, 13 Aug 2025 03:20:31 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1um22P-000IDz-12 for pgsql-hackers@lists.postgresql.org; Wed, 13 Aug 2025 03:20:30 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-451d41e1ad1so41137985e9.1 for ; Tue, 12 Aug 2025 20:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755055228; x=1755660028; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=4197uNv0tP0aV8tMkypn3jIxI6bgKniLjGAfTfv7IAw=; b=cvMCj5+DUJK+ZSHvJeL6SF9fGg6AW8gu5jc/Z4ERYXCjP8l4rAjNl8O/3dTib/x1W2 hguXPgEHTfNfTEr+QjKJDnDXbMC4hOkJbzruz0ECVm4gwY7OyAcv7aGBkLUpekCTtjJg 8myD2kbZUyHlDsuG0j5VjlQwm4OktCRPtMCq2uAMYPFg7u5oiQNNCuSMXzRNsaol16oW bWi/UOQwWfd0oVlwb71TDUSL/SH7UrNGAfeaPL6W9sA2WglmczULFkTJklHmSHhMya4a gftkuBlXXLqOSquvcQjvDKTAkx+WNdQf+IgOgeWZxMooVyKnjr2L2cV0WleCsQVrxXHx XGYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755055228; x=1755660028; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4197uNv0tP0aV8tMkypn3jIxI6bgKniLjGAfTfv7IAw=; b=H2IlH+Ezyw6Q6is06IUVG8hSV/RrDo6tSn3D65O20GGJ2GDfpd52CPyOdfMdkbSAnO +Do8cTegag1UKOLfqRXTFIY3iXcQkPWPqNQhWHgUiqzukS7BoAngdhbnKZ+RAk8A/5vn Y0xnEK+DOzw/fpOb4ZUSq8/F/eL6/WSt0DH2UppXefl7XYBaKC08WKhi4PvcMvFXjzul ZAXi5aPaUV4srgXTtS95d4V0zJ4L+tQmY3H1CsijVVWV8tz3BCHNs/mkG58O7uJUjGUx 4fCdlMmyMSYVeYAFKrfBw++ZTPxJd998P1oeB0nAtCQvf3taMUJefctN8ixvQZMKdGri GWBg== X-Gm-Message-State: AOJu0YygEF9UYnkTUKUXK5HNAv+EKUzhMLyt6g+tc5WQ0fuFUOP3Ac+q 1T9oweUwiUdQOej/bqz9jal3rbivgfJGCHBvBXJyvHUPs67CJS7PQsxD X-Gm-Gg: ASbGncui/dapc1juos/U8Mmm6VltwzHsdcLS3loR/p3H4l+n7mdg034af7C5LPGaBE5 G2RdAUpElLmZTYT1HG9kefVCnT7gwoXbV/Te5mrMc5taJnZKuNyKLhicMwkuZ1L+uR98ozqHBhP jUhNOBF2aDZuqRRi2sO/lqrO9VX31VAfF9BFuoCoZHFnDv8Dhwm/FuXO7Aw9Q0OrAwiK7luImTj cUXGh/gfWpc+MMpwkoSOARh+BqzbJD8St7HZqKnENIYDlmDxCJTEBsRrBh7RDM7cVIrxwtg7EEJ Y9T1lt/j9xU2Yabo84fmr/wz0m9iJUzwHhA6RCHWRPib21s4Wd3faeLiSG+sTXYeux3Lws57SO+ 0D76jxN1inOYY/ityrt3pcxNJXfKwpjP2eFNZhsPokgZTQklCRJ/Y3DYBxjBRMnzA160Euv1alF 8hRqidZMconp0BgSr12yUZFSFNRgWyAmTq/7wm2X5PrYXCW3GLWwzNQA== X-Google-Smtp-Source: AGHT+IFvsrje2q4TRpXZ0MpFroefHqdNI9hxf3N8oTXViyRczmb6o+jrh4C6/UerGDwajPM/3C1NiQ== X-Received: by 2002:a05:600c:4fc7:b0:43c:fe5e:f040 with SMTP id 5b1f17b1804b1-45a165ee3e5mr8783725e9.23.1755055228192; Tue, 12 Aug 2025 20:20:28 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-181-182.eu-west-3.compute.amazonaws.com. [15.237.181.182]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b8fc28a7b0sm21775322f8f.63.2025.08.12.20.20.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Aug 2025 20:20:27 -0700 (PDT) Date: Wed, 13 Aug 2025 03:20:26 +0000 From: Bertrand Drouvot To: Greg Sabino Mullane Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Adding locks statistics Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Tue, Aug 12, 2025 at 08:54:07AM -0400, Greg Sabino Mullane wrote: > On Tue, Aug 12, 2025 at 5:32 AM Bertrand Drouvot < > bertranddrouvot.pg@gmail.com> wrote: > > > Docs: seem good. Needs a section on how to reset via > > > SELECT pg_stat_reset_shared('lock'); > > > > I meant something closer to the actual description of the view. Having it > buried in the pg_stat_reset_shared section is not intuitive for people > looking up the view in the docs. I agree that we could add this extra information in the view documentation. But none of pg_stat_archiver, pg_stat_bgwriter, pg_stat_checkpointer, pg_stat_io, pg_stat_slru and pg_stat_wal have done so. The only exception is pg_stat_recovery_prefetch and for a good reason as not all of its fields are reset. While I think that's probably a good idea, I think it's worth a dedicated thread (so that the discussion takes into account the other views mentioned above). Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com