# 51.53. pg\_subscription\_rel

目錄 pg\_subscription\_rel 包含每個訂閱中每個複寫關係的狀態。這是多對多的關連情況。

在執行 CREATE SUBSCRIPTION 或 ALTER SUBSCRIPTION ... REFRESH PUBLICATION 之後才會更新，此目錄僅會包含已知的訂閱資料表。

#### **Table 51.53. `pg_subscription_rel` Columns**

| <p>Column Type</p><p>Description</p>                                                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>srsubid</code> <code>oid</code> (references <a href="https://www.postgresql.org/docs/13/catalog-pg-subscription.html"><code>pg\_subscription</code></a>.<code>oid</code>)</p><p>Reference to subscription</p> |
| <p><code>srrelid</code> <code>oid</code> (references <a href="https://www.postgresql.org/docs/13/catalog-pg-class.html"><code>pg\_class</code></a>.<code>oid</code>)</p><p>Reference to relation</p>                   |
| <p><code>srsubstate</code> <code>char</code></p><p>State code: <code>i</code> = initialize, <code>d</code> = data is being copied, <code>s</code> = synchronized, <code>r</code> = ready (normal replication)</p>      |
| <p><code>srsublsn</code> <code>pg\_lsn</code></p><p>Remote LSN of the state change used for synchronization coordination when in <code>s</code> or <code>r</code> states, otherwise null</p>                           |


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.postgresql.tw/14/internals/system-catalogs/pg_subscription_rel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
