> 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/the-sql-language/functions/functions-admin/functions-admin-index.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 9.28.8. 索引維護函式

## 9.28.8. 索引維護函式 [#](#functions-admin-index) <a href="#functions-admin-index" id="functions-admin-index"></a>

[表 9.107](#functions-admin-index-table) 列出可用於索引維護工作的函式。（請注意，這些維護工作通常由 autovacuum 自動完成；只有在特殊情況下才需要使用這些函式。）這些函式不能在復原期間執行。這些函式只限超級使用者與該索引的擁有者使用。

### 表 9.107. 索引維護函式 [#](#functions-admin-index-table) <a href="#functions-admin-index-table" id="functions-admin-index-table"></a>

| <p>函式</p><p>說明</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><code>brin\_summarize\_new\_values</code> ( <em><code>index</code></em> <code>regclass</code> ) → <code>integer</code></p><p>掃描指定的 BRIN 索引，找出基礎資料表中目前尚未被該索引摘要的頁面範圍；對於每個這樣的範圍，會掃描那些資料表頁面來建立新的摘要索引 tuple（值組）。回傳插入索引中的新頁面範圍摘要數量。</p>                                                                                                                                                                                                                                                                                                             |
| <p><code>brin\_summarize\_range</code> ( <em><code>index</code></em> <code>regclass</code>, <em><code>blockNumber</code></em> <code>bigint</code> ) → <code>integer</code></p><p>如果涵蓋指定區塊的頁面範圍尚未被摘要，就對它進行摘要。這與 <code>brin\_summarize\_new\_values</code> 類似，差別在於它只處理涵蓋指定資料表區塊編號的頁面範圍。</p>                                                                                                                                                                                                                                                        |
| <p><code>brin\_desummarize\_range</code> ( <em><code>index</code></em> <code>regclass</code>, <em><code>blockNumber</code></em> <code>bigint</code> ) → <code>void</code></p><p>移除摘要涵蓋指定資料表區塊之頁面範圍的 BRIN 索引 tuple（值組），如果有的話。</p>                                                                                                                                                                                                                                                                                                                 |
| <p><code>gin\_clean\_pending\_list</code> ( <em><code>index</code></em> <code>regclass</code> ) → <code>bigint</code></p><p>將指定 GIN 索引之「pending」清單中的項目批次移入主要的 GIN 資料結構，藉此清理該清單。回傳從 pending 清單中移除的頁面數。如果引數是在停用 <code>fastupdate</code> 選項的情況下建立的 GIN 索引，就不會進行任何清理，結果為零，因為該索引沒有 pending 清單。關於 pending 清單與 <code>fastupdate</code> 選項的詳細資訊，請參閱<a href="https://docs.postgresql.tw/19/internals/indextypes/gin.md#GIN-FAST-UPDATE">第 65.4.4.1 節</a>與<a href="https://docs.postgresql.tw/19/internals/indextypes/gin.md#gin-tips">第 65.4.5 節</a>。</p> |

<br>

[返回 9.28. 系統管理函式](https://docs.postgresql.tw/19/the-sql-language/functions/functions-admin.md#functions-admin)

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/functions-admin.html)（原文版本：18.6；核對日期：2026-09-11）


---

# 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/the-sql-language/functions/functions-admin/functions-admin-index.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.
