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

# PostgreSQL 伺服器應用程式

## PostgreSQL 伺服器應用程式

***

本部分包含 PostgreSQL 伺服器應用程式與支援工具程式的參考資訊。這些命令只有在資料庫伺服器所在的主機上執行才有用處。其他工具程式列於 [PostgreSQL 用戶端應用程式](https://docs.postgresql.tw/19/reference/reference-client.md)。

**目錄**

[initdb](https://docs.postgresql.tw/19/reference/reference-server/app-initdb.md) — 建立新的 PostgreSQL 資料庫叢集

[pg\_archivecleanup](https://docs.postgresql.tw/19/reference/reference-server/pgarchivecleanup.md) — 清理 PostgreSQL WAL 歸檔檔案

[pg\_checksums](https://docs.postgresql.tw/19/reference/reference-server/app-pgchecksums.md) — 在 PostgreSQL 資料庫叢集中啟用、停用或檢查資料校驗和

[pg\_controldata](https://docs.postgresql.tw/19/reference/reference-server/app-pgcontroldata.md) — 顯示 PostgreSQL 資料庫叢集的控制資訊

[pg\_createsubscriber](https://docs.postgresql.tw/19/reference/reference-server/app-pgcreatesubscriber.md) — 將實體複本轉換為新的邏輯複本

[pg\_ctl](https://docs.postgresql.tw/19/reference/reference-server/app-pg-ctl.md) — 初始化、啟動、停止或控制 PostgreSQL 伺服器

[pg\_resetwal](https://docs.postgresql.tw/19/reference/reference-server/app-pgresetwal.md) — 重設 PostgreSQL 資料庫叢集的預寫式日誌及其他控制資訊

[pg\_rewind](https://docs.postgresql.tw/19/reference/reference-server/app-pgrewind.md) — 將 PostgreSQL 資料目錄與另一個從它分岔出去的資料目錄同步

[pg\_test\_fsync](https://docs.postgresql.tw/19/reference/reference-server/pgtestfsync.md) — 判定 PostgreSQL 最快的 `wal_sync_method`

[pg\_test\_timing](https://docs.postgresql.tw/19/reference/reference-server/pgtesttiming.md) — 測量計時的額外負擔

[pg\_upgrade](https://docs.postgresql.tw/19/reference/reference-server/pgupgrade.md) — 升級 PostgreSQL 伺服器執行個體

[pg\_waldump](https://docs.postgresql.tw/19/reference/reference-server/pgwaldump.md) — 以人類可讀的形式顯示 PostgreSQL 資料庫叢集的預寫日誌

[pg\_walsummary](https://docs.postgresql.tw/19/reference/reference-server/app-pgwalsummary.md) — 印出 WAL 摘要檔案的內容

[postgres](https://docs.postgresql.tw/19/reference/reference-server/app-postgres.md) — PostgreSQL 資料庫伺服器

***

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


---

# 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/reference/reference-server.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.
