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

# 29.10. 監控

### 29.10. 監控 [#](#logical-replication-monitoring) <a href="#logical-replication-monitoring" id="logical-replication-monitoring"></a>

由於邏輯複寫的架構與[實體串流複寫](https://docs.postgresql.tw/19/server-administration/high-availability/warm-standby.md#streaming-replication)相近，發佈節點的監控方式也類似於實體複寫主要伺服器的監控（請參閱[第 26.2.5.2 節](https://docs.postgresql.tw/19/server-administration/high-availability/warm-standby.md#STREAMING-REPLICATION-MONITORING)）。

訂閱的監控資訊可在 [`pg_stat_subscription`](https://docs.postgresql.tw/19/server-administration/monitoring/monitoring-stats/monitoring-pg-stat-subscription.md#monitoring-pg-stat-subscription)中查看。此檢視表會為每個訂閱工作者包含一個資料列。訂閱可依其狀態有零個或多個作用中的訂閱工作者。

一般而言，已啟用的訂閱會有一個套用程序執行。已停用或當機的訂閱在此檢視表中沒有資料列。若任何資料表正在進行初始資料同步，則會有額外工作者處理同步中的資料表。此外，若[`streaming`](https://docs.postgresql.tw/19/reference/sql-commands/sql-createsubscription/sql-createsubscription-parameters.md#sql-createsubscription-params-with-streaming)交易以平行方式套用，可能還會有額外的平行套用工作者。

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/logical-replication-monitoring.html)（原文版本：18.6；核對日期：2026-09-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/server-administration/logical-replication/logical-replication-monitoring.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.
