51.87. pg_shmem_allocations

51.87. `pg_shmem_allocations`
Prev | Up | Chapter 51. System Catalogs | Home | Next

## 51.87. `pg_shmem_allocations`

The `pg_shmem_allocations` view shows allocations made from the server's main shared memory segment. This includes both memory allocated by postgres itself and memory allocated by extensions using the mechanisms detailed in Section 37.10.10.

Note that this view does not include memory allocated using the dynamic shared memory infrastructure.

Table 51.88. `pg_shmem_allocations` Columns

Column Type Description
`name` `text` The name of the shared memory allocation. NULL for unused memory and `<anonymous>` for anonymous allocations.
`off` `int8` The offset at which the allocation starts. NULL for anonymous allocations and unused memory.
`size` `int8` Size of the allocation
`allocated_size` `int8` Size of the allocation including padding. For anonymous allocations, no information about padding is available, so the `size` and `allocated_size` columns will always be equal. Padding is not meaningful for free memory, so the columns will be equal in that case also.

Anonymous allocations are allocations that have been made with `ShmemAlloc()` directly, rather than via `ShmemInitStruct()` or `ShmemInitHash()`.

By default, the `pg_shmem_allocations` view can be read only by superusers.

Prev | Up | Next
51.86. `pg_shadow` | Home | 51.88. `pg_stats`