pg_buffercache — Cache-Pressure Analysis
Install pg_buffercache to inspect shared_buffers — which relations are hot, how much is dirty, and when to size up.
The System page's "Buffer Cache" card is the surface this extension feeds. With pg_buffercache installed, MonPG can answer the question "what's actually hot in shared_buffers right now" — top 20 relations by buffer count, dirty buffer count, buffer utilization percentage. Without it, the card is empty.
The dirty buffer count pairs with checkpoint metrics on the same page; together they tell you whether checkpointer is keeping up. Buffer utilization tells you whether shared_buffers is sized right or you're constantly evicting. The utilization signal alone has saved a few customers a Postgres restart for a sizing change that turned out not to be needed.
Enabling
Pure CREATE EXTENSION, no SPL, no restart. Available on RDS, Azure, Cloud SQL, Crunchy, Aiven, and self-hosted. On Heroku it's Standard+ only — Hobby and Essential don't allow it.
CREATE EXTENSION IF NOT EXISTS pg_buffercache;
On Azure, add pg_buffercache to azure.extensions first.
Cost
The extension scans the entire buffer pool — every 16KB page in shared_buffers. For an 8GB shared_buffers that's roughly 500k rows per scan. We run this every 20 cycles (around 10 minutes), and on typical clusters the query returns in under 100ms. If you have an unusually large shared_buffers or the scan ever shows up as slow, you can lower the frequency in collector config — but most clusters won't notice.