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 1r3AHM-002Ru7-6a for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Nov 2023 07:25:40 +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 1r3AHK-00ERpe-N3 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Nov 2023 07:25:38 +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.94.2) (envelope-from ) id 1r3AHJ-00ERpW-Rj for pgsql-hackers@lists.postgresql.org; Wed, 15 Nov 2023 07:25:38 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3AHH-006WdI-GK for pgsql-hackers@postgresql.org; Wed, 15 Nov 2023 07:25:37 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 451D85C0129; Wed, 15 Nov 2023 02:25:33 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 15 Nov 2023 02:25:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1700033133; x=1700119533; bh=rr qha+P4NeAKZaGtw9CtujSFAHqkTUgz4C69JhTyR9k=; b=ocYZuQCbwvszARn9Hi wdOX4QujaFhPWfaI9A0LhOq1yfs0cipBAYgWh/oqNtKuk7uRUJJ4kQVPfexuwDzs h6sjziz22OZxHGspzXlRS+0IphQkScQrGTeKIvrndXqjcD0tZ6mtmbVom5c2FvGP WYUamlz4dZAB/KZon+ZFNRd1j/tUx+ImcVJTWZmbqU5XimaDxVo80O7wbhZ9xpLb aTxEOK/acOtyArN1oJY2eWkjhNN1Oj2cnVVXVQ1LJwD4De0Dc8xSWTGO6HqIP/2P HNk5g1cZdXtCXfnOs2j+c0UhtQU0s3LLtner8YDLQeyNlfUbMjUgP94VyJe0q0GK KNCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1700033133; x=1700119533; bh=rrqha+P4NeAKZ aGtw9CtujSFAHqkTUgz4C69JhTyR9k=; b=X32Mmi1vAS7I5kyZzkS0Kfs+NPziz dC/gNndXhJ4ifYNGXDwpRVCeqmeKzW/bjJ/8+Uxt82XUU2LO4QYpDS4hRrSiS9aN zPiecvEvN/nZsK7Uk02duyPCXSbQKR4O61xTgW9mTLKkHWxm4eg9zO+Dv3ZDMZBK g8uP/O+7mJ3lCzasUTWlJTMMUKzLn87n9RSmxsMc0fHLfK8SD5/vM9wqbbKrDnPn jwEZ66Y3XWYshqVbPgl3Q6gRg73uIIeT6lpQGwDPYDzzFY+zb9cC0J75/XIIgxhk oXJjAFz12yy4jE1Qtt4A5T+XFA3Bd1IxGHI/GnfLGU4jHe2hzahaQemyw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudefhedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Nov 2023 02:25:30 -0500 (EST) Date: Wed, 15 Nov 2023 16:25:14 +0900 From: Michael Paquier To: torikoshia Cc: Andres Freund , boekewurm+postgres@gmail.com, Kyotaro Horiguchi , pgsql-hackers@postgresql.org, bharath.rupireddyforpostgres@gmail.com Subject: Re: Add new option 'all' to pg_stat_reset_shared() Message-ID: References: <20231109012952.fft2i356ofljugt6@awork3.anarazel.de> <37bce6feca33e0c0441cd33f9eaa51d6@oss.nttdata.com> <89C9D2DC-8239-4373-991A-18CC45D6A5FE@anarazel.de> <6c01af77007905c73751f42eea03aef5@oss.nttdata.com> <350550211cf7d235cd92e5c7969e8f68@oss.nttdata.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="u9NIsxEfB9lN+v3S" Content-Disposition: inline In-Reply-To: <350550211cf7d235cd92e5c7969e8f68@oss.nttdata.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --u9NIsxEfB9lN+v3S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 15, 2023 at 11:58:38AM +0900, torikoshia wrote: > On 2023-11-15 09:47, Michael Paquier wrote: >> You have forgotten to update the errhint at the end of >> pg_stat_reset_shared(), where "slru" needs to be listed :) >=20 > Oops, attached v2 patch. +SELECT stats_reset > :'slru_reset_ts'::timestamptz FROM pg_stat_slru; A problem with these two queries is that they depend on the number of SLRUs set in the system while only returning a single 't' without the cache names each tuple is linked to. To keep things simple, you could just LIMIT 1 or aggregate through the whole set. Other than that, it looks OK. -- Michael --u9NIsxEfB9lN+v3S Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmVUcloACgkQnvQgOdby QH0W1hAAqU0GjfrAPfLL7o4abOWzs0jktdRfzVslaNgcILzMhjRg7VJhLsPMDO4e wOuQgxXyu3auiloCIvfAQaeuI5T7Xrc/vXNkUnfpdDalx95oEAe0bbIqYNYNqC7F bnWmMI5FBmo+7o6C1yQ9T/QZNcqouUgXm4+kunaWSG1qybCpRweAmCPXiphZHGUt Dn3nrSlta9uWkYlOhQMMRA1//RkOI0iLctQ4yx3xoboVfUy/R01YLUmEK0W7vxyZ FqbYrqK1tUPINnXb0qHYPeG0ukoviQvdf0Kc33E6eDHHxVMgouXPt80DQ720Judg E8dc9ynqybYUI864U2CIDxUMrLx5dCnLCSU4wvE9DjSjSBmgqc/jYBc7vy6IQ9Se F7Mjc8u5hLoC/yUeUxglsID/h9IaaGZJxO+T3WmmVMxJg4kY1GgznRX3vRttNPv5 PWc7Y+MhV1DfUIqt8G6Aq7KrZcOb8IrwoiF08OUsXmZ8r6ycxKWpr6GrP2JzJjvq LG5tbFLx4F5ZGpmXeNJMjnf2Gnc5QZTNzTTMqHFdISYTjik79Fwf2sfqSp2DOK+3 brrzcQQANdQIh6UTPpec3ybpIfd35LgONfrfV24Yh6k/26MaaEUkA8NqjT8mf+F9 2hkH/O2ACxgeReVRj4UKFt+CmeQEAeuELGUDllZoDWgEy3WL+Uo= =gpE4 -----END PGP SIGNATURE----- --u9NIsxEfB9lN+v3S--