pg_buffercache: Add pg_buffercache_summary() Using pg_buffercache_summary() is significantly cheaper than querying pg_buffercache and summarizing in SQL.
Author: Melih Mutlu <m.melihmu...@gmail.com> Reviewed-by: Andres Freund <and...@anarazel.de> Reviewed-by: Aleksander Alekseev <aleksan...@timescale.com> Reviewed-by: Zhang Mingli <zmlpostg...@gmail.com> Discussion: https://postgr.es/m/CAGPVpCQAXYo54Q%3D8gqBsS%3Du0uk9qhnnq4%2B710BtUhUisX1XGEg%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/2589434ae0fbfe08e46b6a4ffba400140b636074 Modified Files -------------- contrib/pg_buffercache/Makefile | 3 +- contrib/pg_buffercache/expected/pg_buffercache.out | 33 ++++++ contrib/pg_buffercache/meson.build | 1 + .../pg_buffercache/pg_buffercache--1.3--1.4.sql | 17 +++ contrib/pg_buffercache/pg_buffercache.control | 2 +- contrib/pg_buffercache/pg_buffercache_pages.c | 67 ++++++++++++ contrib/pg_buffercache/sql/pg_buffercache.sql | 18 ++++ doc/src/sgml/pgbuffercache.sgml | 114 ++++++++++++++++++++- 8 files changed, 250 insertions(+), 5 deletions(-)