> 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/18/server-administration.md).

# 第 III 部：伺服器管理

## 第 III 部：伺服器管理

本部涵蓋 PostgreSQL 管理者會感興趣的主題， 包括安裝、伺服器設定、使用者與資料庫的管理，以及維護工作。 任何執行 PostgreSQL 伺服器的人，即使只是個人使用， 但尤其是在正式環境中使用時，都應該熟悉這些主題。

本部的資訊嘗試依照新使用者應該閱讀的順序來安排。 各章節本身內容完整，可依需要單獨閱讀。這些資訊是以主題單元的方式， 用敘事的形式呈現。若讀者想尋找某個指令的完整說明， 建議參閱 [第 VI 部](https://docs.postgresql.tw/18/reference.md)。

最初幾章的撰寫方式，不需要任何先備知識即可理解， 因此需要自行架設伺服器的新使用者可以由此開始探索。 本部其餘部分則是關於調校與管理；這部分的內容假設讀者已熟悉 PostgreSQL 資料庫系統的一般使用方式。 建議讀者參閱 [第 I 部](https://docs.postgresql.tw/18/tutorial.md) 與 [第 II 部](https://docs.postgresql.tw/18/the-sql-language.md) 以取得補充資訊。

**目錄**

* [第 16 章：從二進位檔安裝](https://docs.postgresql.tw/18/server-administration/install-binaries.md)
* [第 17 章：從原始碼安裝](https://docs.postgresql.tw/18/server-administration/installation.md)
  * [17.1. 需求](https://docs.postgresql.tw/18/server-administration/installation/install-requirements.md)
  * [17.2. 取得原始碼](https://docs.postgresql.tw/18/server-administration/installation/install-getsource.md)
  * [17.3. 使用 Autoconf 與 Make 建置與安裝](https://docs.postgresql.tw/18/server-administration/installation/install-make.md)
  * [17.4. 使用 Meson 建置與安裝](https://docs.postgresql.tw/18/server-administration/installation/install-meson.md)
  * [17.5. 安裝後設定](https://docs.postgresql.tw/18/server-administration/installation/install-post.md)
  * [17.6. 支援的平台](https://docs.postgresql.tw/18/server-administration/installation/supported-platforms.md)
  * [17.7. 特定平台注意事項](https://docs.postgresql.tw/18/server-administration/installation/installation-platform-notes.md)
* [第 18 章：伺服器設定與運作](https://docs.postgresql.tw/18/server-administration/runtime.md)
  * [18.1. PostgreSQL 使用者帳號](https://docs.postgresql.tw/18/server-administration/runtime/postgres-user.md)
  * [18.2. 建立資料庫叢集](https://docs.postgresql.tw/18/server-administration/runtime/creating-cluster.md)
  * [18.3. 啟動資料庫伺服器](https://docs.postgresql.tw/18/server-administration/runtime/server-start.md)
  * [18.4. 管理核心資源](https://docs.postgresql.tw/18/server-administration/runtime/kernel-resources.md)
  * [18.5. 關閉伺服器](https://docs.postgresql.tw/18/server-administration/runtime/server-shutdown.md)
  * [18.6. 升級 PostgreSQL 叢集](https://docs.postgresql.tw/18/server-administration/runtime/upgrading.md)
  * [18.7. 防止伺服器偽冒](https://docs.postgresql.tw/18/server-administration/runtime/preventing-server-spoofing.md)
  * [18.8. 加密選項](https://docs.postgresql.tw/18/server-administration/runtime/encryption-options.md)
  * [18.9. 使用 SSL 建立安全的 TCP/IP 連線](https://docs.postgresql.tw/18/server-administration/runtime/ssl-tcp.md)
  * [18.10. 使用 GSSAPI 加密建立安全的 TCP/IP 連線](https://docs.postgresql.tw/18/server-administration/runtime/gssapi-enc.md)
  * [18.11. 使用 SSH 通道建立安全的 TCP/IP 連線](https://docs.postgresql.tw/18/server-administration/runtime/ssh-tunnels.md)
  * [18.12. 在 Windows 上註冊事件日誌](https://docs.postgresql.tw/18/server-administration/runtime/event-log-registration.md)
* [第 19 章：伺服器設定](https://docs.postgresql.tw/18/server-administration/runtime-config.md)
  * [19.1. 設定參數](https://docs.postgresql.tw/18/server-administration/runtime-config/config-setting.md)
  * [19.2. 檔案位置](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-file-locations.md)
  * [19.3. 連線與驗證](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-connection.md)
  * [19.4. 資源耗用](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-resource.md)
  * [19.5. 預寫日誌](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-wal.md)
  * [19.6. 複寫](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-replication.md)
  * [19.7. 查詢規劃](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-query.md)
  * [19.8. 錯誤回報與日誌記錄](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-logging.md)
  * [19.9. 執行期統計資訊](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-statistics.md)
  * [19.10. 資料清理（Vacuuming）](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-vacuum.md)
  * [19.11. 用戶端連線預設值](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-client.md)
  * [19.12. 鎖定管理](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-locks.md)
  * [19.13. 版本與平台相容性](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-compatible.md)
  * [19.14. 錯誤處理](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-error-handling.md)
  * [19.15. 預先設定的選項](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-preset.md)
  * [19.16. 自訂選項](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-custom.md)
  * [19.17. 開發者選項](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-developer.md)
  * [19.18. 簡寫選項](https://docs.postgresql.tw/18/server-administration/runtime-config/runtime-config-short.md)
* [第 20 章：用戶端驗證](https://docs.postgresql.tw/18/server-administration/client-authentication.md)
  * [20.1. `pg_hba.conf` 檔案](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-pg-hba-conf.md)
  * [20.2. 使用者名稱對應](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-username-maps.md)
  * [20.3. 驗證方法](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-methods.md)
  * [20.4. Trust 驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-trust.md)
  * [20.5. 密碼驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-password.md)
  * [20.6. GSSAPI 驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/gssapi-auth.md)
  * [20.7. SSPI 驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/sspi-auth.md)
  * [20.8. Ident 驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-ident.md)
  * [20.9. Peer 驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-peer.md)
  * [20.10. LDAP 驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-ldap.md)
  * [20.11. RADIUS 驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-radius.md)
  * [20.12. 憑證驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-cert.md)
  * [20.13. PAM 驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-pam.md)
  * [20.14. BSD 驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-bsd.md)
  * [20.15. OAuth 授權／驗證](https://docs.postgresql.tw/18/server-administration/client-authentication/auth-oauth.md)
  * [20.16. 驗證疑難排解](https://docs.postgresql.tw/18/server-administration/client-authentication/client-authentication-problems.md)
* [第 21 章：資料庫角色](https://docs.postgresql.tw/18/server-administration/user-manag.md)
  * [21.1. 資料庫角色](https://docs.postgresql.tw/18/server-administration/user-manag/database-roles.md)
  * [21.2. 角色屬性](https://docs.postgresql.tw/18/server-administration/user-manag/role-attributes.md)
  * [21.3. 角色成員資格](https://docs.postgresql.tw/18/server-administration/user-manag/role-membership.md)
  * [21.4. 刪除角色](https://docs.postgresql.tw/18/server-administration/user-manag/role-removal.md)
  * [21.5. 預先定義的角色](https://docs.postgresql.tw/18/server-administration/user-manag/predefined-roles.md)
  * [21.6. 函式安全性](https://docs.postgresql.tw/18/server-administration/user-manag/perm-functions.md)
* [第 22 章：管理資料庫](https://docs.postgresql.tw/18/server-administration/managing-databases.md)
  * [22.1. 概觀](https://docs.postgresql.tw/18/server-administration/managing-databases/manage-ag-overview.md)
  * [22.2. 建立資料庫](https://docs.postgresql.tw/18/server-administration/managing-databases/manage-ag-createdb.md)
  * [22.3. 範本資料庫](https://docs.postgresql.tw/18/server-administration/managing-databases/manage-ag-templatedbs.md)
  * [22.4. 資料庫設定](https://docs.postgresql.tw/18/server-administration/managing-databases/manage-ag-config.md)
  * [22.5. 刪除資料庫](https://docs.postgresql.tw/18/server-administration/managing-databases/manage-ag-dropdb.md)
  * [22.6. 資料表空間](https://docs.postgresql.tw/18/server-administration/managing-databases/manage-ag-tablespaces.md)
* [第 23 章：在地化](https://docs.postgresql.tw/18/server-administration/charset.md)
  * [23.1. 地區設定支援](https://docs.postgresql.tw/18/server-administration/charset/locale.md)
  * [23.2. 定序支援](https://docs.postgresql.tw/18/server-administration/charset/collation.md)
  * [23.3. 字元集支援](https://docs.postgresql.tw/18/server-administration/charset/multibyte.md)
* [第 24 章：例行性資料庫維護工作](https://docs.postgresql.tw/18/server-administration/maintenance.md)
  * [24.1. 例行性資料清理（Vacuuming）](https://docs.postgresql.tw/18/server-administration/maintenance/routine-vacuuming.md)
  * [24.2. 例行性重建索引](https://docs.postgresql.tw/18/server-administration/maintenance/routine-reindex.md)
  * [24.3. 日誌檔維護](https://docs.postgresql.tw/18/server-administration/maintenance/logfile-maintenance.md)
* [第 25 章：備份與還原](https://docs.postgresql.tw/18/server-administration/backup.md)
  * [25.1. SQL 傾印](https://docs.postgresql.tw/18/server-administration/backup/backup-dump.md)
  * [25.2. 檔案系統層級備份](https://docs.postgresql.tw/18/server-administration/backup/backup-file.md)
  * [25.3. 持續歸檔與時間點還原（PITR）](https://docs.postgresql.tw/18/server-administration/backup/continuous-archiving.md)
* [第 26 章：高可用性、負載平衡與複寫](https://docs.postgresql.tw/18/server-administration/high-availability.md)
  * [26.1. 不同解決方案的比較](https://docs.postgresql.tw/18/server-administration/high-availability/different-replication-solutions.md)
  * [26.2. 日誌傳送備援伺服器](https://docs.postgresql.tw/18/server-administration/high-availability/warm-standby.md)
  * [26.3. 容錯移轉](https://docs.postgresql.tw/18/server-administration/high-availability/warm-standby-failover.md)
  * [26.4. 熱備援](https://docs.postgresql.tw/18/server-administration/high-availability/hot-standby.md)
* [第 27 章：監控資料庫活動](https://docs.postgresql.tw/18/server-administration/monitoring.md)
  * [27.1. 標準 Unix 工具](https://docs.postgresql.tw/18/server-administration/monitoring/monitoring-ps.md)
  * [27.2. 累積統計資訊系統](https://docs.postgresql.tw/18/server-administration/monitoring/monitoring-stats.md)
  * [27.3. 檢視鎖定](https://docs.postgresql.tw/18/server-administration/monitoring/monitoring-locks.md)
  * [27.4. 進度回報](https://docs.postgresql.tw/18/server-administration/monitoring/progress-reporting.md)
  * [27.5. 動態追蹤](https://docs.postgresql.tw/18/server-administration/monitoring/dynamic-trace.md)
  * [27.6. 監控磁碟用量](https://docs.postgresql.tw/18/server-administration/monitoring/diskusage.md)
* [第 28 章：可靠性與預寫日誌](https://docs.postgresql.tw/18/server-administration/wal.md)
  * [28.1. 可靠性](https://docs.postgresql.tw/18/server-administration/wal/wal-reliability.md)
  * [28.2. 資料檢查碼](https://docs.postgresql.tw/18/server-administration/wal/checksums.md)
  * [28.3. 預寫日誌（WAL）](https://docs.postgresql.tw/18/server-administration/wal/wal-intro.md)
  * [28.4. 非同步提交](https://docs.postgresql.tw/18/server-administration/wal/wal-async-commit.md)
  * [28.5. WAL 設定](https://docs.postgresql.tw/18/server-administration/wal/wal-configuration.md)
  * [28.6. WAL 內部機制](https://docs.postgresql.tw/18/server-administration/wal/wal-internals.md)
* [第 29 章：邏輯複寫](https://docs.postgresql.tw/18/server-administration/logical-replication.md)
  * [29.1. 發佈](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-publication.md)
  * [29.2. 訂閱](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-subscription.md)
  * [29.3. 邏輯複寫容錯移轉](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-failover.md)
  * [29.4. 資料列篩選器](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-row-filter.md)
  * [29.5. 欄位清單](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-col-lists.md)
  * [29.6. 產生欄位的複寫](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-gencols.md)
  * [29.7. 衝突](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-conflicts.md)
  * [29.8. 限制](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-restrictions.md)
  * [29.9. 架構](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-architecture.md)
  * [29.10. 監控](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-monitoring.md)
  * [29.11. 安全性](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-security.md)
  * [29.12. 設定值](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-config.md)
  * [29.13. 升級](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-upgrade.md)
  * [29.14. 快速設定](https://docs.postgresql.tw/18/server-administration/logical-replication/logical-replication-quick-setup.md)
* [第 30 章：即時編譯（JIT）](https://docs.postgresql.tw/18/server-administration/jit.md)
  * [30.1. 什麼是 JIT 編譯？](https://docs.postgresql.tw/18/server-administration/jit/jit-reason.md)
  * [30.2. 何時該使用 JIT？](https://docs.postgresql.tw/18/server-administration/jit/jit-decision.md)
  * [30.3. 設定](https://docs.postgresql.tw/18/server-administration/jit/jit-configuration.md)
  * [30.4. 可延伸性](https://docs.postgresql.tw/18/server-administration/jit/jit-extensibility.md)
* [第 31 章：迴歸測試](https://docs.postgresql.tw/18/server-administration/regress.md)
  * [31.1. 執行測試](https://docs.postgresql.tw/18/server-administration/regress/regress-run.md)
  * [31.2. 測試評估](https://docs.postgresql.tw/18/server-administration/regress/regress-evaluation.md)
  * [31.3. 變體比較檔](https://docs.postgresql.tw/18/server-administration/regress/regress-variant.md)
  * [31.4. TAP 測試](https://docs.postgresql.tw/18/server-administration/regress/regress-tap.md)
  * [31.5. 測試涵蓋率檢查](https://docs.postgresql.tw/18/server-administration/regress/regress-coverage.md)

***

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


---

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