RefLib

Reference library for AI

Back

postgresql_16:9.6.27 pg_buffercache — inspect PostgreSQL buffer cache state

PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > pg_buffercache — inspect PostgreSQL buffer cache state

The pg_buffercache module provides a means for examining what's happening in the shared buffer cache in real time.

This module provides the pg_buffercache_pages() function (wrapped in the pg_buffercache view), the pg_buffercache_summary() function, and the pg_buffercache_usage_counts() function.

The pg_buffercache_pages() function returns a set of records, each row describing the state of one shared buffer entry. The pg_buffercache view wraps the function for convenient use.

The pg_buffercache_summary() function returns a single row summarizing the state of the shared buffer cache.

The pg_buffercache_usage_counts() function returns a set of records, each row describing the number of buffers with a given usage count.

By default, use is restricted to superusers and roles with privileges of the pg_monitor role. Access may be granted to others using GRANT.

Subsections

Back