Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkqqB-0001jn-Is for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Apr 2023 18:29:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pkqqA-0005dt-E7 for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Apr 2023 18:29:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkqqA-0005dc-4k for pgsql-hackers@lists.postgresql.org; Fri, 07 Apr 2023 18:29:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkqq7-0007lf-VD for pgsql-hackers@postgresql.org; Fri, 07 Apr 2023 18:29:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 337ITVe03089323; Fri, 7 Apr 2023 14:29:31 -0400 From: Tom Lane To: Nathan Bossart cc: Robert Haas , Andres Freund , pgsql-hackers@postgresql.org, schneider@ardentperf.com Subject: Re: monitoring usage count distribution In-reply-to: <20230406180608.GA275542@nathanxps13> References: <20230404232919.uibzbhjdylk3mlvp@awork3.anarazel.de> <20230405175124.GA31516@nathanxps13> <20230405190921.ck7v4y2h3ogoanvg@awork3.anarazel.de> <20230405194101.GB105962@nathanxps13> <2061855.1680725784@sss.pgh.pa.us> <2478091.1680802355@sss.pgh.pa.us> <20230406180608.GA275542@nathanxps13> Comments: In-reply-to Nathan Bossart message dated "Thu, 06 Apr 2023 11:06:08 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3089321.1680892171.1@sss.pgh.pa.us> Date: Fri, 07 Apr 2023 14:29:31 -0400 Message-ID: <3089322.1680892171@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Thu, Apr 06, 2023 at 01:32:35PM -0400, Tom Lane wrote: >> There seems to be enough support for the existing summary function >> definition to leave it as-is; Andres likes it for one, and I'm not >> excited about trying to persuade him he's wrong. But a second >> slightly-less-aggregated summary function is clearly useful as well. >> So I'm now thinking that we do want the patch as-submitted. >> (Caveat: I've not read the patch, just the description.) > In case we want to do both, here's a 0002 that changes usagecount_avg to an > array of usage counts. I'm not sure if there is consensus for 0002, but I reviewed and pushed 0001. I made one non-cosmetic change: it no longer skips invalid buffers. Otherwise, the row for usage count 0 would be pretty useless. Also it seemed to me that sum(buffers) ought to agree with the shared_buffers setting. regards, tom lane