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 1r2OMD-00GTaz-0T for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Nov 2023 04:15:29 +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 1r2OMB-00Cl8N-4w for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Nov 2023 04:15:27 +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 1r2OMA-00Cl8F-NN for pgsql-hackers@lists.postgresql.org; Mon, 13 Nov 2023 04:15:26 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r2OM2-005J4S-RD for pgsql-hackers@postgresql.org; Mon, 13 Nov 2023 04:15:25 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id B199B606AC; Mon, 13 Nov 2023 13:15:14 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 13 Nov 2023 13:15:14 +0900 From: torikoshia To: Michael Paquier , bharath.rupireddyforpostgres@gmail.com Cc: Andres Freund , boekewurm+postgres@gmail.com, Kyotaro Horiguchi , pgsql-hackers@postgresql.org Subject: Re: Add new option 'all' to pg_stat_reset_shared() In-Reply-To: References: <20231108041331.mmxtbr3cmufy4f3v@awork3.anarazel.de> <62d8244b05557a91e25914c02607b493@oss.nttdata.com> <20231109012952.fft2i356ofljugt6@awork3.anarazel.de> <37bce6feca33e0c0441cd33f9eaa51d6@oss.nttdata.com> <89C9D2DC-8239-4373-991A-18CC45D6A5FE@anarazel.de> <6c01af77007905c73751f42eea03aef5@oss.nttdata.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: torikoshia@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-11-12 16:46, Michael Paquier wrote: > On Fri, Nov 10, 2023 at 01:15:50PM +0900, Michael Paquier wrote: >> The comments added could be better grammatically, but basically LGTM. >> I'll take care of that if there are no objections. > > The documentation also needed a few tweaks (for DEFAULT and the > argument name), so I have fixed the whole and adapted the new part of > the docs to that, with few little tweaks. Thanks! I assume you have already taken this into account, but I think we should add the same documentation to the below patch for pg_stat_reset_slru(): https://www.postgresql.org/message-id/CALj2ACW4Fqc_m%2BOaavrOMEivZ5aBa24pVKvoXRTmuFECsNBfAg%40mail.gmail.com On 2023-11-12 16:54, Michael Paquier wrote: > On Fri, Nov 10, 2023 at 08:32:34PM +0900, torikoshia wrote: >> On 2023-11-10 13:18, Andres Freund wrote: >>> I see no reason to not include slrus. We should never have added the >>> ability to reset them individually, particularly not without a use >>> case - I couldn't find one skimming some discussion. And what's the >>> point in not allowing to reset them via pg_stat_reset_shared()? >> >> When including SLRUs, do you think it's better to add 'slrus' argument >> which >> enables pg_stat_reset_shared() to reset all SLRUs? > > I understand that Andres says that he'd be OK with a addition of a > 'slru' option in pg_stat_reset_shared(), as well as including SLRUs in > the resets if everything should be wiped. Thanks, I'll make the patch. > 28cac71bd368 is around since 13~, so changing pg_stat_reset_slru() or > removing it could impact existing applications, so there's little > benefit in changing it at this stage. Let it be itself. +1. >> As described above, since SLRUs cannot be reset by >> pg_stat_reset_shared(), I >> feel a bit uncomfortable to delete it all together. > > That would be only effective if NULL is given to the function to reset > everything, which is OK IMO, because this is a shared stats. > -- > Michael -- Regards, -- Atsushi Torikoshi NTT DATA Group Corporation