pg_subscription
The catalog pg_subscription contains all existing logical replication subscriptions. For more information about logical replication see Chapter 29. 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.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- kind
- catalog
- lang
- en
- measured attributes
- true
- metadata release
- 18.6
- runtime columns
- oid, subdbid, subskiplsn, subname, subowner, subenabled, subbinary, substream, subtwophasestate, subdisableonerr, subpasswordrequired, subrunasowner, subfailover, subconninfo, subslotname, subsynccommit, subpublications, suborigin
- runtime verified
- false
- source
- english-manual
Definition PG 18
The catalog pg_subscription contains all existing logical replication subscriptions. For more information about logical replication see Chapter 29. 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.
Catalog columns
| Column | Type | Nullability | Description |
|---|---|---|---|
| oid | oid | Not null | Row identifier |
| subdbid | oid | Not null | OID of the database that the subscription resides in |
| subskiplsn | pg_lsn | Not null | Finish LSN of the transaction whose changes are to be skipped, if a valid LSN; otherwise 0/0. |
| subname | name | Not null | Name of the subscription |
| subowner | oid | Not null | Owner of the subscription |
| subenabled | bool | Not null | If true, the subscription is enabled and should be replicating |
| subbinary | bool | Not null | If true, the subscription will request that the publisher send data in binary format |
| substream | char | Not null | Controls how to handle the streaming of in-progress transactions: f = disallow streaming of in-progress transactions, t = spill the changes of in-progress transactions to disk and apply at once after the transaction is committed on the publisher and received by the subscriber, p = apply changes directly using a parallel apply worker if available (same as t if no worker is available) |
| subtwophasestate | char | Not null | State codes for two-phase mode: d = disabled, p = pending enablement, e = enabled |
| subdisableonerr | bool | Not null | If true, the subscription will be disabled if one of its workers detects an error |
| subpasswordrequired | bool | Not null | If true, the subscription will be required to specify a password for authentication |
| subrunasowner | bool | Not null | If true, the subscription will be run with the permissions of the subscription owner |
| subfailover | bool | Not null | If true, the associated replication slots (i.e. the main slot and the table synchronization slots) in the upstream database are enabled to be synchronized to the standbys |
| subconninfo | text | Not null | Connection string to the upstream database |
| subslotname | name | Nullable | Name of the replication slot in the upstream database (also used for the local replication origin name); null represents NONE |
| subsynccommit | text | Not null | The synchronous_commit setting for the subscription's workers to use |
| subpublications | text[] | Not null | Array of subscribed publication names. These reference publications defined in the upstream database. For more on publications see Section 29.1. |
| suborigin | text | Nullable | The origin value must be either none or any. The default is any. If none, the subscription will request the publisher to only send changes that don't have an origin. If any, the publisher sends changes regardless of their origin. |
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · catalog-bilingual-repair:265178e59b6e200eba9fafa34ae0c7a85a7f110bc128c45c840027d2d4e3ab44
Text language: en · catalog-bilingual-repair:265178e59b6e200eba9fafa34ae0c7a85a7f110bc128c45c840027d2d4e3ab44