pg_stat_conn
Cumulative connection, disconnection, and authentication-failure counts by database and role.
pg_stat_conn · Cumulative connection, disconnection, and authentication-failure counts by database and role.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101930 | pg_stat_conn | pg_stat_conn | 1.0 | STAT | PostgreSQL | C |
PostgreSQL · 15, 16, 17, 18
Usage
Sources:
pg_stat_conn Cumulative connection, disconnection, and authentication-failure counts by database and role.
Enablement
Merge pg_stat_conn into the existing preload list, restart PostgreSQL, and then create pg_stat_conn in each database that needs its SQL objects:
Core Workflow
The following example is taken from the reviewed upstream documentation. Adapt object names, paths, credentials, and workload values before use.
Main Objects
The reviewed install surface includes these prominent objects:
| Object | Kind | Operational role |
|---|---|---|
pg_stat_conn_reset | FUNCTION | Callable function from the reviewed install surface. |
Operations and Boundaries
- The verified PostgreSQL-major evidence covers 15, 16, 17, 18; do not infer unlisted majors.
- Preloading
pg_stat_connchanges cluster startup state; stage configuration and restart changes separately fromCREATE EXTENSION.