]> begriffs open source - ai-pg/blob - full-docs/src/sgml/html/catalog-pg-subscription.html
PG 18 docs from https://ftp.postgresql.org/pub/source/v18.0/postgresql-18.0-docs...
[ai-pg] / full-docs / src / sgml / html / catalog-pg-subscription.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>52.54. pg_subscription</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="catalog-pg-statistic-ext-data.html" title="52.53. pg_statistic_ext_data" /><link rel="next" href="catalog-pg-subscription-rel.html" title="52.55. pg_subscription_rel" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">52.54. <code class="structname">pg_subscription</code></th></tr><tr><td width="10%" align="left"><a accesskey="p" href="catalog-pg-statistic-ext-data.html" title="52.53. pg_statistic_ext_data">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="catalogs.html" title="Chapter 52. System Catalogs">Up</a></td><th width="60%" align="center">Chapter 52. System Catalogs</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="catalog-pg-subscription-rel.html" title="52.55. pg_subscription_rel">Next</a></td></tr></table><hr /></div><div class="sect1" id="CATALOG-PG-SUBSCRIPTION"><div class="titlepage"><div><div><h2 class="title" style="clear: both">52.54. <code class="structname">pg_subscription</code> <a href="#CATALOG-PG-SUBSCRIPTION" class="id_link">#</a></h2></div></div></div><a id="id-1.10.4.56.2" class="indexterm"></a><p>
3    The catalog <code class="structname">pg_subscription</code> contains all existing
4    logical replication subscriptions.  For more information about logical
5    replication see <a class="xref" href="logical-replication.html" title="Chapter 29. Logical Replication">Chapter 29</a>.
6   </p><p>
7    Unlike most system catalogs, <code class="structname">pg_subscription</code> is
8    shared across all databases of a cluster: there is only one copy
9    of <code class="structname">pg_subscription</code> per cluster, not one per
10    database.
11   </p><p>
12    Access to the column <code class="structfield">subconninfo</code> is revoked from
13    normal users, because it could contain plain-text passwords.
14   </p><div class="table" id="id-1.10.4.56.6"><p class="title"><strong>Table 52.54. <code class="structname">pg_subscription</code> Columns</strong></p><div class="table-contents"><table class="table" summary="pg_subscription Columns" border="1"><colgroup><col /></colgroup><thead><tr><th class="catalog_table_entry"><p class="column_definition">
15        Column Type
16       </p>
17       <p>
18        Description
19       </p></th></tr></thead><tbody><tr><td class="catalog_table_entry"><p class="column_definition">
20        <code class="structfield">oid</code> <code class="type">oid</code>
21       </p>
22       <p>
23        Row identifier
24       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
25        <code class="structfield">subdbid</code> <code class="type">oid</code>
26        (references <a class="link" href="catalog-pg-database.html" title="52.15. pg_database"><code class="structname">pg_database</code></a>.<code class="structfield">oid</code>)
27       </p>
28       <p>
29        OID of the database that the subscription resides in
30       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
31        <code class="structfield">subskiplsn</code> <code class="type">pg_lsn</code>
32       </p>
33       <p>
34        Finish LSN of the transaction whose changes are to be skipped, if a valid
35        LSN; otherwise <code class="literal">0/0</code>.
36       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
37        <code class="structfield">subname</code> <code class="type">name</code>
38       </p>
39       <p>
40        Name of the subscription
41       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
42        <code class="structfield">subowner</code> <code class="type">oid</code>
43        (references <a class="link" href="catalog-pg-authid.html" title="52.8. pg_authid"><code class="structname">pg_authid</code></a>.<code class="structfield">oid</code>)
44       </p>
45       <p>
46        Owner of the subscription
47       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
48        <code class="structfield">subenabled</code> <code class="type">bool</code>
49       </p>
50       <p>
51        If true, the subscription is enabled and should be replicating
52       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
53        <code class="structfield">subbinary</code> <code class="type">bool</code>
54       </p>
55       <p>
56        If true, the subscription will request that the publisher send data
57        in binary format
58       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
59        <code class="structfield">substream</code> <code class="type">char</code>
60       </p>
61       <p>
62        Controls how to handle the streaming of in-progress transactions:
63        <code class="literal">f</code> = disallow streaming of in-progress transactions,
64        <code class="literal">t</code> = spill the changes of in-progress transactions to
65        disk and apply at once after the transaction is committed on the
66        publisher and received by the subscriber,
67        <code class="literal">p</code> = apply changes directly using a parallel apply
68        worker if available (same as <code class="literal">t</code> if no worker is
69        available)
70       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
71        <code class="structfield">subtwophasestate</code> <code class="type">char</code>
72       </p>
73       <p>
74        State codes for two-phase mode:
75        <code class="literal">d</code> = disabled,
76        <code class="literal">p</code> = pending enablement,
77        <code class="literal">e</code> = enabled
78       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
79        <code class="structfield">subdisableonerr</code> <code class="type">bool</code>
80       </p>
81       <p>
82        If true, the subscription will be disabled if one of its workers
83        detects an error
84       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
85        <code class="structfield">subpasswordrequired</code> <code class="type">bool</code>
86       </p>
87       <p>
88        If true, the subscription will be required to specify a password
89        for authentication
90       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
91        <code class="structfield">subrunasowner</code> <code class="type">bool</code>
92       </p>
93       <p>
94        If true, the subscription will be run with the permissions
95        of the subscription owner
96       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
97        <code class="structfield">subfailover</code> <code class="type">bool</code>
98       </p>
99       <p>
100        If true, the associated replication slots (i.e. the main slot and the
101        table synchronization slots) in the upstream database are enabled to be
102        synchronized to the standbys
103       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
104        <code class="structfield">subconninfo</code> <code class="type">text</code>
105       </p>
106       <p>
107        Connection string to the upstream database
108       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
109        <code class="structfield">subslotname</code> <code class="type">name</code>
110       </p>
111       <p>
112        Name of the replication slot in the upstream database (also used
113        for the local replication origin name);
114        null represents <code class="literal">NONE</code>
115       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
116        <code class="structfield">subsynccommit</code> <code class="type">text</code>
117       </p>
118       <p>
119        The <code class="varname">synchronous_commit</code>
120        setting for the subscription's workers to use
121       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
122        <code class="structfield">subpublications</code> <code class="type">text[]</code>
123       </p>
124       <p>
125        Array of subscribed publication names. These reference
126        publications defined in the upstream database. For more on publications
127        see <a class="xref" href="logical-replication-publication.html" title="29.1. Publication">Section 29.1</a>.
128       </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">
129        <code class="structfield">suborigin</code> <code class="type">text</code>
130       </p>
131       <p>
132        The origin value must be either <code class="literal">none</code> or
133        <code class="literal">any</code>. The default is <code class="literal">any</code>.
134        If <code class="literal">none</code>, the subscription will request the publisher
135        to only send changes that don't have an origin. If
136        <code class="literal">any</code>, the publisher sends changes regardless of their
137        origin.
138       </p></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="catalog-pg-statistic-ext-data.html" title="52.53. pg_statistic_ext_data">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="catalogs.html" title="Chapter 52. System Catalogs">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="catalog-pg-subscription-rel.html" title="52.55. pg_subscription_rel">Next</a></td></tr><tr><td width="40%" align="left" valign="top">52.53. <code class="structname">pg_statistic_ext_data</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 52.55. <code class="structname">pg_subscription_rel</code></td></tr></table></div></body></html>