pg_pulse
Active Session History (ASH) for PostgreSQL
pg_pulse · Active Session History (ASH) for PostgreSQL
Overview
Usage
Sources:
- Official upstream README
- Official extension control file (pg_pulse.control)
- Official extension SQL (pg_pulse–1.0.sql)
pg_pulse — A lock-free, in-memory Active Session History (ASH) sampler for PostgreSQL 14–18 — inspired by Oracle’s ASH, built for low-overhead, continuous session-level monitoring in production. Use it when collecting or interpreting the corresponding PostgreSQL statistics. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
pg_pulse_conn_ring_sample(OUT sample_time timestamptz, OUT total_connections int, OUT active_connections int, OUT idle_connections int, OUT idle_in_transaction_connections int, OUT idle_in_transaction_aborted_connections int, OUT other_connections int)is an extension function and returnsSETOF.pg_pulse_purge_history(retention_days int DEFAULT NULL)is an extension function and returnsvoid.pg_pulse_connections_liveis an extension-defined view.pg_pulse_liveis an extension-defined view.pg_pulse_connection_historyis a table installed or managed by the extension.pg_pulse_historyis a table installed or managed by the extension.
Requirements and Caveats
- The reviewed control file declares default version
1.0. - The control file marks the extension as non-relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.