postgresql_16:9.6.27.2 The pg_buffercache_summary() Function
PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > pg_buffercache — inspect PostgreSQL buffer cache state > The pg_buffercache_summary() Function
The definitions of the columns exposed by the function are shown in (see pgbuffercache-summary-columns).
| Column Type Description | | --- | | buffers_used int4 Number of used shared buffers | | buffers_unused int4 Number of unused shared buffers | | buffers_dirty int4 Number of dirty shared buffers | | buffers_pinned int4 Number of pinned shared buffers | | usagecount_avg float8 Average usage count of used shared buffers |
The pg_buffercache_summary() function returns a single row summarizing the state of all shared buffers. Similar and more detailed information is provided by the pg_buffercache view, but pg_buffercache_summary() is significantly cheaper.
Like the pg_buffercache view, pg_buffercache_summary() does not acquire buffer manager locks. Therefore concurrent activity can lead to minor inaccuracies in the result.