plprofiler
server-side support for profiling PL/pgSQL functions
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
plprofiler | 4.2.5 | LANG | Artistic-1.0 | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3070 | plprofiler | No | Yes | Yes | Yes | No | Yes | - |
| Related | plpgsql_check pldbgapi pglinter pg_stat_plans pg_stat_statements auto_explain pg_store_plans pg_show_plans hypopg index_advisor |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 4.2.5 | 1817161514 | plprofiler | - |
| RPM | PGDG | 4.2.5 | 1817161514 | plprofiler_$v | - |
| DEB | PGDG | 4.2.5 | 1817161514 | postgresql-$v-plprofiler | - |
Install
You can install plprofiler directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Preload:
Create Extension:
Usage
plprofiler: server-side support for profiling PL/pgSQL functions
plprofiler is a profiling tool for PL/pgSQL functions that identifies performance bottlenecks and generates interactive flame graph reports.
Configuration
Add to postgresql.conf:
Command-Line Tool
The plprofiler command-line utility controls profiling and generates reports:
SQL Interface
Report Output
Generated HTML reports include:
- Interactive flame graphs showing wall-clock time spent in PL/pgSQL code
- Per-function statistics with self-time (total minus children)
- Top functions ranked by time consumption (default: top 10)
- Self-contained HTML requiring no external dependencies
Profiling Methods
- Direct profiling: Run specific SQL while collecting data
- Timed collection: Interval-based statistics gathering
- Per-user profiling: Enable profiling for specific database users via
ALTER USER - Production monitoring: Low-overhead profiling on live systems
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)