pg_rusage
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_rusage | 1.0 | STAT | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6230 | pg_rusage | No | Yes | No | Yes | No | Yes | - |
pg_rusage_print() emits the current backend measurement as a WARNING and returns void. No preload; PostgreSQL 14-18 verified in PGSTY builds; upstream declares no major-version matrix.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0 | 1817161514 | pg_rusage | - |
| RPM | PIGSTY | 1.0 | 1817161514 | pg_rusage_$v | - |
| DEB | PIGSTY | 1.0 | 1817161514 | postgresql-$v-pg-rusage | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.0 el8.x86_64.pg18 : pg_rusage_18 pg_rusage_18-1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg17 : pg_rusage_17 pg_rusage_17-1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg16 : pg_rusage_16 pg_rusage_16-1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg15 : pg_rusage_15 pg_rusage_15-1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg14 : pg_rusage_14 pg_rusage_14-1.0-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 1.0 el8.aarch64.pg18 : pg_rusage_18 pg_rusage_18-1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg17 : pg_rusage_17 pg_rusage_17-1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg16 : pg_rusage_16 pg_rusage_16-1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg15 : pg_rusage_15 pg_rusage_15-1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg14 : pg_rusage_14 pg_rusage_14-1.0-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 1.0 el9.x86_64.pg18 : pg_rusage_18 pg_rusage_18-1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg17 : pg_rusage_17 pg_rusage_17-1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg16 : pg_rusage_16 pg_rusage_16-1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg15 : pg_rusage_15 pg_rusage_15-1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg14 : pg_rusage_14 pg_rusage_14-1.0-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 1.0 el9.aarch64.pg18 : pg_rusage_18 pg_rusage_18-1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg17 : pg_rusage_17 pg_rusage_17-1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg16 : pg_rusage_16 pg_rusage_16-1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg15 : pg_rusage_15 pg_rusage_15-1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg14 : pg_rusage_14 pg_rusage_14-1.0-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 1.0 el10.x86_64.pg18 : pg_rusage_18 pg_rusage_18-1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg17 : pg_rusage_17 pg_rusage_17-1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg16 : pg_rusage_16 pg_rusage_16-1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg15 : pg_rusage_15 pg_rusage_15-1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg14 : pg_rusage_14 pg_rusage_14-1.0-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 1.0 el10.aarch64.pg18 : pg_rusage_18 pg_rusage_18-1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg17 : pg_rusage_17 pg_rusage_17-1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg16 : pg_rusage_16 pg_rusage_16-1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg15 : pg_rusage_15 pg_rusage_15-1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg14 : pg_rusage_14 pg_rusage_14-1.0-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 1.0 d12.x86_64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 1.0 d12.aarch64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 1.0 d13.x86_64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 1.0 d13.aarch64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 1.0 u22.x86_64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 1.0 u22.aarch64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 1.0 u24.x86_64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 1.0 u24.aarch64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 1.0 u26.x86_64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 1.0 u26.aarch64.pg18 : postgresql-18-pg-rusage postgresql-18-pg-rusage_1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg17 : postgresql-17-pg-rusage postgresql-17-pg-rusage_1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg16 : postgresql-16-pg-rusage postgresql-16-pg-rusage_1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg15 : postgresql-15-pg-rusage postgresql-15-pg-rusage_1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg14 : postgresql-14-pg-rusage postgresql-14-pg-rusage_1.0-1PGSTY~resolute_arm64.deb
|
Build
You can build the RPM / DEB packages for pg_rusage using pig build:
Install
You can install pg_rusage directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
- Official upstream README
- Official extension control file (pg_rusage.control)
- Official extension SQL (pg_rusage–1.0.sql)
pg_rusage — This module is a PostgreSQL extension that can enable CPU measurements, with one SQL function to enable the measurement and one to disable it. When disabling, the existing accumulated results will show up. 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_rusage_print()is an extension function and returnsvoid.pg_rusage_reset()is an extension function and returnsvoid.
Requirements and Caveats
- The reviewed control file declares default version
1.0. - The control file marks the extension as relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)