Summary
The pg_shmem_allocations_numa shows how shared memory allocations in the server’s main shared memory segment are distributed across NUMA nodes. This includes both memory allocated by PostgreSQL itself and memory allocated by extensions using the mechanisms detailed in xfunc_shared_addin. This view will output multiple rows for each of the shared memory segments provided that they are spread across multiple NUMA nodes. This view should not be queried by monitoring systems as it is very slow and may end up allocating shared memory in case it was not used earlier. Current limitation for this view is that won’t show anonymous shared memory allocations.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_shmem_allocations_numa system view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
nametext
The name of the shared memory allocation.numa_nodeint4
ID of NUMA nodesizeint8
Size of the allocation on this particular NUMA memory node in bytes
Version applicability
Present in PostgreSQL 18, 19 (verified against each release’s documentation). This object was introduced in PostgreSQL 18.
Related & references
Reference: PostgreSQL documentation — pg_shmem_allocations_numa.