---
title: "PostgreSQL integration | Grafana Labs"
description: "Monitoring PostgreSQL databases"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

## PostgreSQL integration

The PostgreSQL integration provides **database performance monitoring** designed around PostgreSQL-specific concerns like vacuum and MVCC.

|                    |                                                                         |
|--------------------|-------------------------------------------------------------------------|
| **What it’s for**  | Monitoring queries, connections, replication, and vacuum/bloat health   |
| **Who uses it**    | DBAs, backend developers, DevOps teams managing PostgreSQL databases    |
| **Under the hood** | Surfaces PostgreSQL internals without requiring deep database expertise |

## Metrics collected

- **Queries** — Active, waiting, duration
- **Connections** — Used, available, by state
- **Transactions** — Commits, rollbacks, conflicts
- **Replication** — Lag, slot status
- **Vacuum** — Dead tuples, autovacuum

## Trade-offs

**Best for:** PostgreSQL databases, especially with replication or high transaction volumes

| Pros                                                | Cons                                  |
|-----------------------------------------------------|---------------------------------------|
| Pre-built dashboards: overview, replication, vacuum | Requires monitoring user setup        |
| Pre-built alerts: connections, replication, vacuum  | Some metrics need pg\_stat extensions |
| Vacuum and dead tuple monitoring (MVCC)             |                                       |
| Buffer cache hit ratio insights                     |                                       |
| Query waiting and lock detection                    |                                       |

* * *

## Learning path

Deploy this integration step by step.

[PostgreSQL integration](/docs/learning-hub/intro-to-integrations/02-hands-on/18a-postgresql-journey/)
