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 1pjlZm-0001mf-5T for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2023 18:40:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pjlZk-00076m-Uo for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Apr 2023 18:40:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pjlZk-00076d-Lo for pgsql-hackers@lists.postgresql.org; Tue, 04 Apr 2023 18:40:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pjlZd-000saJ-KJ for pgsql-hackers@postgresql.org; Tue, 04 Apr 2023 18:40:11 +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 334Ie2bi1586363; Tue, 4 Apr 2023 14:40:02 -0400 From: Tom Lane To: Robert Haas cc: Nathan Bossart , pgsql-hackers@postgresql.org, schneider@ardentperf.com Subject: Re: monitoring usage count distribution In-reply-to: References: <20230130233040.GA2800702@nathanxps13> Comments: In-reply-to Robert Haas message dated "Tue, 04 Apr 2023 14:31:36 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1586361.1680633602.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 04 Apr 2023 14:40:02 -0400 Message-ID: <1586362.1680633602@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Mon, Jan 30, 2023 at 6:30=E2=80=AFPM Nathan Bossart wrote: >> My colleague Jeremy Schneider (CC'd) was recently looking into usage co= unt >> distributions for various workloads, and he mentioned that it would be = nice >> to have an easy way to do $SUBJECT. > I'm skeptical that pg_buffercache_summary() is a good idea at all, but > having it display the average usage count seems like a particularly > poor idea. That information is almost meaningless. Replacing that with > a six-element integer array would be a clear improvement and, IMHO, > better than adding yet another function to the extension. I had not realized that pg_buffercache_summary() is new in v16, but since it is, we still have time to rethink its definition. +1 for de-aggregating --- I agree that the overall average is unlikely to have much value. regards, tom lane