Re: monitoring usage count distribution
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>,
pgsql-hackers@postgresql.org, schneider@ardentperf.com
Date: 2023-04-07T18:29:31Z
Lists: pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> 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
Commits
-
Add pg_buffercache_usage_counts() to contrib/pg_buffercache.
- f3fa31327ecb 16.0 landed