Extensions

pg_wait_sampling — Wait-Event Drill-Down

Install pg_wait_sampling for sampled wait-event histories on the Queries and Backends pages.

By default PostgreSQL exposes the current wait event per backend in pg_stat_activity. That's a snapshot — you see what each backend is doing right now. pg_wait_sampling adds a background sampler that records wait events over time, so you can answer "what was this backend waiting on" historically: LWLock contention, buffer I/O, client reads, transaction commit, all the categories.

This matters because the most useful slowness analysis happens after the slowness is over. MonPG's Backends and Queries pages surface sampled wait profiles so you can answer "why is this slow" without being at the keyboard the moment slowness happens.

Enabling

SPL-bound and restart-bound. Where it's available depends on your provider.

AWS RDS / Aurora

Not available. Not in the RDS extension allowlist. AWS Performance Insights covers some of the same ground via internal sampling, and MonPG's own pg_stat_activity sampler picks up what it can — but you don't get the full pg_wait_sampling view.

Azure Flexible Server

Not shipped. MonPG samples pg_stat_activity natively for wait event coverage instead.

Google Cloud SQL

Shipped on Cloud SQL v1.1.5+. Flag: cloudsql.enable_pg_wait_sampling=on. Then CREATE EXTENSION pg_wait_sampling;.

Aiven

Not available — submit on Aiven Ideas if you want it. The aiven-gatekeeper guardian blocks SECURITY DEFINER chains that some sampler-extensions need.

Crunchy Bridge

Not in the default supported list; request via support. They've added it for individual customers before.

Self-hosted

Install from source or package (postgresql-15-pg-wait-sampling on most distros), add to shared_preload_libraries, restart, CREATE EXTENSION pg_wait_sampling;. The simplest path of any provider.