> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/19/internals/views/view-pg-shmem-allocations-numa.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 53.28. pg\_shmem\_allocations\_numa \#

### 53.28. `pg_shmem_allocations_numa` [#](#view-pg-shmem-allocations-numa) <a href="#view-pg-shmem-allocations-numa" id="view-pg-shmem-allocations-numa"></a>

`pg_shmem_allocations_numa` 顯示伺服器主要共享記憶體區段中的共享記憶體配置如何分布於各 NUMA 節點。這同時包含 PostgreSQL 本身配置的記憶體，以及擴充功能透過[第 36.10.11 節](https://docs.postgresql.tw/19/server-programming/extend/xfunc-c.md#xfunc-shared-addin)所述機制配置的記憶體。只要共享記憶體區段分布於多個 NUMA 節點，此檢視表就會為每個這樣的區段輸出多個資料列。監控系統不應查詢此檢視表，因為它非常緩慢，而且若共享記憶體先前未被使用，查詢最後可能會配置這些共享記憶體。此檢視表目前的限制是不會顯示匿名共享記憶體配置。

請注意，此檢視表不包含使用動態共享記憶體基礎設施所配置的記憶體。

#### 警告

在判定 NUMA 節點時，此檢視表會存取（touch）共享記憶體區段的所有記憶體分頁。若共享記憶體尚未配置，這會強制配置它，而且這些記憶體可能會被配置在單一 NUMA 節點上（取決於系統設定）。

**表 53.28. `pg_shmem_allocations_numa` 欄位**

| <p>欄位類型</p><p>說明</p>                                                             |
| -------------------------------------------------------------------------------- |
| <p><code>name</code> <code>text</code></p><p>共享記憶體配置的名稱。</p>                     |
| <p><code>numa\_node</code> <code>int4</code></p><p>NUMA 節點的 ID</p>               |
| <p><code>size</code> <code>int8</code></p><p>此配置在這個特定 NUMA 記憶體節點上的大小，以位元組為單位</p> |

<br>

預設情況下，只有超級使用者或具有 `pg_read_all_stats` 角色權限的角色可以讀取 `pg_shmem_allocations_numa` 檢視表。

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/view-pg-shmem-allocations-numa.html)（原文版本：18.6；核對日期：2026-10-09）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/19/internals/views/view-pg-shmem-allocations-numa.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
