pgmeminfo
pgmeminfo : show memory usage
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | pgnodemx system_stats pg_stat_kcache pgmonitor pg_stat_ch pg_datasentinel pgsentinel |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED | 1.0.1 |
18 17 16 15 14 | pgmeminfo |
- |
| RPM | PIGSTY | 1.0.1 |
18 17 16 15 14 | pgmeminfo_$v |
- |
| DEB | PIGSTY | 1.0.1 |
18 17 16 15 14 | postgresql-$v-pgmeminfo |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG 1.0.0 | PGDG 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| el8.aarch64 | PGDG 1.0.0 | PGDG 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| el9.x86_64 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 |
| el9.aarch64 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 |
| el10.x86_64 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 |
| el10.aarch64 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 | PGDG 1.0.0 |
| d12.x86_64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| d12.aarch64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| d13.x86_64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| d13.aarch64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| u22.x86_64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| u22.aarch64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| u24.x86_64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| u24.aarch64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| u26.x86_64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
| u26.aarch64 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 | PIGSTY 1.0.0 |
Source
github.com/okbob/pgmeminfo
pgmeminfo-VERSION_1_0_1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
pgmeminfo reports allocator statistics and the memory-context hierarchy of the current PostgreSQL backend. It does not aggregate memory across the cluster.
Inspect Memory
Have a superuser install the extension, then inspect the current connection:
pgmeminfo() returns allocator counters such as arena, uordblks, fordblks, and keepcost. They are allocator-specific measurements, not process RSS or an estimate of free cluster memory.
pgmeminfo_contexts(deep, accum_mode) returns context names, parents, levels and byte counts. The default accumulation mode is all; off reports contexts without descendant accumulation, while deep => -1 removes the depth limit.
Operation and Version
No preload or restart is required. Upstream release 1.0.1 keeps SQL extension version 1.0; do not use package release 1.0.1 as an SQL update target. Context names and output values can change as the backend executes queries. Review function access if internal context names should not be visible to ordinary users.