PostgreSQL with Database Observability
Database Observability gives you deep visibility into PostgreSQL query performance. This slide’s path is for a database you run yourself.
What you’ll get
- Queries Overview dashboard showing RED metrics for tracked queries
- Explain plans with visual graphs showing scan types, join strategies, and cost distribution
- Wait events categorized by I/O, lock, and network waits from
pg_stat_activity - Query samples with individual execution timing. Parameters are redacted by default.
- Table schemas showing structures, indexes, and constraints
Before you start
A few things to keep in mind:
- PostgreSQL 14 or later is required.
- Load
pg_stat_statementsinshared_preload_libraries. Changing that setting requires a restart. Then create the extension in each database you want to monitor. - Query statistics need the
pg_monitorandpg_read_all_statsroles. - Schema details and explain plans also need
USAGEon each schema andSELECTon all tables in that schema, or thepg_read_all_datarole if you want every object. - Amazon RDS, Amazon Aurora, Google Cloud SQL, and Azure Database use a separate setup guide, not this path.
The path below walks you through each step.
Learning path
PostgreSQL Database Observability
Set up Grafana Cloud Database Observability for PostgreSQL to monitor query performance, explain plans, wait events, and query samples.
15 min
Intermediate
Docs & blog posts
Open in Grafana Cloud
Complete this learning path directly in your Grafana Cloud stack with an interactive learning experience.