跳至主要內容

KlustronDB小于 1 分钟

52.52. pg_subscription

The catalog pg_subscription contains all existing logical replication subscriptions. For more information about logical replication see Chapter 31.

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

NameTypeReferencesDescription
oidoidRow identifier (hidden attribute; must be explicitly selected)
subdbidoidpg_database.oidOID of the database which the subscription resides in
subnamenameName of the subscription
subowneroidpg_authid.oidOwner of the subscription
subenabledboolIf true, the subscription is enabled and should be replicating.
subsynccommittextContains the value of the synchronous_commit setting for the subscription workers.
subconninfotextConnection string to the upstream database
subslotnamenameName of the replication slot in the upstream database. Also used for local replication origin name.
subpublicationstext[]Array of subscribed publication names. These reference the publications on the publisher server. For more on publications see Section 31.1.