catalog-pg-subscription.md 3.4 KB
Newer Older
K
KyleZhang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
## 52.52. `pg_subscription`

[]()

 The catalog `pg_subscription` contains all existing logical replication subscriptions. For more information about logical replication see [Chapter 31](logical-replication.html).

 Unlike most system catalogs, `pg_subscription` is shared across all databases of a cluster: there is only one copy of `pg_subscription` per cluster, not one per database.

 Access to the column `subconninfo` is revoked from normal users, because it could contain plain-text passwords.

**Table 52.52. `pg_subscription` Columns**

|                                                                                              Column Type<br/><br/> Description                                                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|                                                                                            `oid` `oid`<br/><br/> Row identifier                                                                                             |
|                                         `subdbid` `oid` (references [`pg_database`](catalog-pg-database.html).`oid`)<br/><br/> OID of the database that the subscription resides in                                         |
|                                                                                     `subname` `name`<br/><br/> Name of the subscription                                                                                     |
|                                                        `subowner` `oid` (references [`pg_authid`](catalog-pg-authid.html).`oid`)<br/><br/> Owner of the subscription                                                        |
|                                                                `subenabled` `bool`<br/><br/> If true, the subscription is enabled and should be replicating                                                                 |
|                                                      `subbinary` `bool`<br/><br/> If true, the subscription will request that the publisher send data in binary format                                                      |
|                                                           `substream` `bool`<br/><br/> If true, the subscription will allow streaming of in-progress transactions                                                           |
|                                                                          `subconninfo` `text`<br/><br/> Connection string to the upstream database                                                                          |
|                               `subslotname` `name`<br/><br/> Name of the replication slot in the upstream database (also used for the local replication origin name); null represents `NONE`                                |
|                                                           `subsynccommit` `text`<br/><br/> The `synchronous_commit` setting for the subscription's workers to use                                                           |
|`subpublications` `text[]`<br/><br/> Array of subscribed publication names. These reference publications defined in the upstream database. For more on publications see [Section 31.1](logical-replication-publication.html).|