Read PG buffercache relations
read_pg_buffercache_relationsIdentify database relations consuming the most shared buffer cache in PostgreSQL. View buffered size, usage count, and dirty pages.
Instructions
Read the list of database relations taking up the most space in the PostgreSQL shared buffer cache. Reports buffered size, percentage of shared buffers, percent of relation buffered, average usage count, and dirty pages. Allows filtering by schema. Requires the pg_buffercache extension. If not installed, returns available=false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| schema | No | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| available | Yes | ||
| relations | Yes |