PG_SUBSCRIPTION
PG_SUBSCRIPTION records all existing subscriptions.
| 
        Column  | 
      
        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)  | 
       
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.