Add pg_buffercache_usage_counts() to contrib/pg_buffercache.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Apr 2023 18:25:45 +0000 (14:25 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Apr 2023 18:25:53 +0000 (14:25 -0400)
commitf3fa31327ecba75ee0e946abaa56dbf471ba704b
treeaeb9141330c50f171f475a8f14c22d3a427adf3c
parente056c557aef4006c3dfbf8a4b94b7ae88eb9fd67
Add pg_buffercache_usage_counts() to contrib/pg_buffercache.

It was pointed out that pg_buffercache_summary()'s report of
the overall average usage count isn't that useful, and what
would be more helpful in many cases is to report totals for
each possible usage count.  Add a new function to do it like
that.  Since pg_buffercache 1.4 is already new for v16,
we don't need to create a new extension version; we'll just
define this as part of 1.4.

Nathan Bossart

Discussion: https://postgr.es/m/20230130233040.GA2800702@nathanxps13
contrib/pg_buffercache/expected/pg_buffercache.out
contrib/pg_buffercache/pg_buffercache--1.3--1.4.sql
contrib/pg_buffercache/pg_buffercache_pages.c
contrib/pg_buffercache/sql/pg_buffercache.sql
doc/src/sgml/pgbuffercache.sgml