52.88. pg\_shmem\_allocations

|52.88. `pg_shmem_allocations`|                   |                           |                  |                           |
|:---------------------------:|-------------------|---------------------------|------------------|---------------------------|
| [Prev](view-pg-shadow.html) |[Up](catalogs.html)|Chapter 52. System Catalogs|[Home](index.html)| [Next](view-pg-stats.html)|

---

## 52.88. `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 38.10.10](xfunc-c.html#XFUNC-SHARED-ADDIN).

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

**Table 52.89. `pg_shmem_allocations` Columns**

|                                                                                                                                      Column Type<br/><br/> Description                                                                                                                                      |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|                                                                                    `name` `text`<br/><br/> The name of the shared memory allocation. NULL for unused memory and `<anonymous>` for anonymous allocations.                                                                                    |
|                                                                               `off` `int8`<br/><br/> The offset at which the allocation starts. NULL for anonymous allocations, since details related to them are not known.                                                                                |
|                                                                                                                               `size` `int8`<br/><br/> Size of the allocation                                                                                                                                |
|`allocated_size` `int8`<br/><br/> 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](view-pg-shadow.html)|[Up](catalogs.html)| [Next](view-pg-stats.html)|
|:--------------------------|:-----------------:|--------------------------:|
|    52.87. `pg_shadow`     |[Home](index.html) |     52.89. `pg_stats`     |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>