pgmeminfo
show memory usage
Repository
okbob/pgmeminfo
https://github.com/okbob/pgmeminfo
Source
pgmeminfo-VERSION_1_0_0.tar.gz
pgmeminfo-VERSION_1_0_0.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pgmeminfo | 1.0.0 | STAT | MIT | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6520 | pgmeminfo | No | Yes | No | Yes | No | No | - |
| Related | pgfincore system_stats pg_buffercache pgnodemx pg_proctab pg_cooldown pgcozy pg_prewarm |
|---|
no pg14 on el8/9 pgdg repo
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 1.0.0 | 1817161514 | pgmeminfo | - |
| RPM | PIGSTY | 1.0.0 | 1817161514 | pgmeminfo_$v | - |
| DEB | PIGSTY | 1.0.0 | 1817161514 | postgresql-$v-pgmeminfo | - |
Build
You can build the RPM / DEB packages for pgmeminfo using pig build:
pig build pkg pgmeminfo # build RPM / DEB packages
Install
You can install pgmeminfo directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install pgmeminfo; # Install for current active PG version
pig ext install -y pgmeminfo -v 18 # PG 18
pig ext install -y pgmeminfo -v 17 # PG 17
pig ext install -y pgmeminfo -v 16 # PG 16
pig ext install -y pgmeminfo -v 15 # PG 15
pig ext install -y pgmeminfo -v 14 # PG 14
dnf install -y pgmeminfo_18 # PG 18
dnf install -y pgmeminfo_17 # PG 17
dnf install -y pgmeminfo_16 # PG 16
dnf install -y pgmeminfo_15 # PG 15
dnf install -y pgmeminfo_14 # PG 14
apt install -y postgresql-18-pgmeminfo # PG 18
apt install -y postgresql-17-pgmeminfo # PG 17
apt install -y postgresql-16-pgmeminfo # PG 16
apt install -y postgresql-15-pgmeminfo # PG 15
apt install -y postgresql-14-pgmeminfo # PG 14
Create Extension:
CREATE EXTENSION pgmeminfo;
Usage
pgmeminfo provides functions to inspect PostgreSQL backend memory usage and memory context hierarchies.
Functions
Memory information overview:
-- Show overall memory info
SELECT * FROM pgmeminfo();
Memory context hierarchy:
-- Show cumulative memory context sizes
SELECT * FROM pgmeminfo_contexts();
-- Show memory contexts to a specific depth
SELECT * FROM pgmeminfo_contexts(deep => 1);
-- Show all contexts without accumulation
SELECT * FROM pgmeminfo_contexts(deep => -1, accum_mode => 'off');
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.