doc-exports/docs/dws/dev/dws_04_1044.html
Lu, Huayi ef0ada5a59 DWS DEV 20240716 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-11-02 09:07:47 +00:00

11 KiB

PG_SUBSCRIPTION

PG_SUBSCRIPTION records all existing subscriptions.

Table 1 PG_SUBSCRIPTION columns

Name

Type

Reference

Description

oid

oid

-

Row identifier (hidden attribute; displayed only when explicitly selected)

subdbid

oid

PG_DATABASE.oid

OID of the database that the subscription belongs to

subname

name

-

Name of a subscription

subowner

oid

PG_AUTHID.oid

Owner of a subscription

subenabled

boolean

-

If it is true, the subscription is enabled and should be replicated.

subconninfo

text

-

Information about the connection to the database at the publisher end

subslotname

text

-

Name of the replication slot in the publisher database If this parameter is left blank, the value is NONE.

subpublications

text[]

-

Array of subscribed publication names. These are the references to the publications on the publisher server.

Examples

View all subscriptions.

1
2
3
4
5
SELECT * FROM pg_subscription;
 subdbid | subname | subowner | subenabled |                                       subconninfo                                        | subslotname | subpublications 
---------+---------+----------+------------+------------------------------------------------------------------------------------------+-------------+-----------------
   15992 | mysub   |       10 | t          | host=1.1.1.1,2.2.2.2 port=10000,20000 dbname=postgres user=repusr1 password=password_123 | mysub       | {mypub}
(1 row)