pgmeminfo
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6520 | pgmeminfo | No | Yes | No | Yes | No | No | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 1.0.1 | 1817161514 | pgmeminfo | - |
| RPM | PIGSTY | 1.0.1 | 1817161514 | pgmeminfo_$v | - |
| DEB | PIGSTY | 1.0.1 | 1817161514 | postgresql-$v-pgmeminfo | - |
Build
You can build the RPM / DEB packages for pgmeminfo using pig build:
Install
You can install pgmeminfo 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:
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.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)