|
240 | 240 | <entry>functions and procedures</entry>
|
241 | 241 | </row>
|
242 | 242 |
|
| 243 | + <row> |
| 244 | + <entry><link linkend="catalog-pg-publication"><structname>pg_publication</structname></link></entry> |
| 245 | + <entry>publications for logical replication</entry> |
| 246 | + </row> |
| 247 | + |
| 248 | + <row> |
| 249 | + <entry><link linkend="catalog-pg-publication-rel"><structname>pg_publication_rel</structname></link></entry> |
| 250 | + <entry>relation to publication mapping</entry> |
| 251 | + </row> |
| 252 | + |
243 | 253 | <row>
|
244 | 254 | <entry><link linkend="catalog-pg-range"><structname>pg_range</structname></link></entry>
|
245 | 255 | <entry>information about range types</entry>
|
|
285 | 295 | <entry>planner statistics</entry>
|
286 | 296 | </row>
|
287 | 297 |
|
| 298 | + <row> |
| 299 | + <entry><link linkend="catalog-pg-subscription"><structname>pg_subscription</structname></link></entry> |
| 300 | + <entry>logical replication subscriptions</entry> |
| 301 | + </row> |
| 302 | + |
288 | 303 | <row>
|
289 | 304 | <entry><link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link></entry>
|
290 | 305 | <entry>tablespaces within this database cluster</entry>
|
|
5271 | 5286 |
|
5272 | 5287 | </sect1>
|
5273 | 5288 |
|
| 5289 | + <sect1 id="catalog-pg-publication"> |
| 5290 | + <title><structname>pg_publication</structname></title> |
| 5291 | + |
| 5292 | + <indexterm zone="catalog-pg-publication"> |
| 5293 | + <primary>pg_publication</primary> |
| 5294 | + </indexterm> |
| 5295 | + |
| 5296 | + <para> |
| 5297 | + The catalog <structname>pg_publication</structname> contains all |
| 5298 | + publications created in the database. For more on publications see |
| 5299 | + <xref linkend="logical-replication-publication">. |
| 5300 | + </para> |
| 5301 | + |
| 5302 | + <table> |
| 5303 | + <title><structname>pg_publication</structname> Columns</title> |
| 5304 | + |
| 5305 | + <tgroup cols="4"> |
| 5306 | + <thead> |
| 5307 | + <row> |
| 5308 | + <entry>Name</entry> |
| 5309 | + <entry>Type</entry> |
| 5310 | + <entry>References</entry> |
| 5311 | + <entry>Description</entry> |
| 5312 | + </row> |
| 5313 | + </thead> |
| 5314 | + |
| 5315 | + <tbody> |
| 5316 | + <row> |
| 5317 | + <entry><structfield>oid</structfield></entry> |
| 5318 | + <entry><type>oid</type></entry> |
| 5319 | + <entry></entry> |
| 5320 | + <entry>Row identifier (hidden attribute; must be explicitly selected)</entry> |
| 5321 | + </row> |
| 5322 | + |
| 5323 | + <row> |
| 5324 | + <entry><structfield>pubname</structfield></entry> |
| 5325 | + <entry><type>Name</type></entry> |
| 5326 | + <entry></entry> |
| 5327 | + <entry>Name of the publication</entry> |
| 5328 | + </row> |
| 5329 | + |
| 5330 | + <row> |
| 5331 | + <entry><structfield>pubowner</structfield></entry> |
| 5332 | + <entry><type>oid</type></entry> |
| 5333 | + <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry> |
| 5334 | + <entry>Owner of the publication</entry> |
| 5335 | + </row> |
| 5336 | + |
| 5337 | + <row> |
| 5338 | + <entry><structfield>puballtables</structfield></entry> |
| 5339 | + <entry><type>bool</type></entry> |
| 5340 | + <entry></entry> |
| 5341 | + <entry>If true, this publication automatically includes all tables |
| 5342 | + in the database, including any that will be created in the future. |
| 5343 | + </entry> |
| 5344 | + </row> |
| 5345 | + |
| 5346 | + <row> |
| 5347 | + <entry><structfield>pubinsert</structfield></entry> |
| 5348 | + <entry><type>bool</type></entry> |
| 5349 | + <entry></entry> |
| 5350 | + <entry>If true, <command>INSERT</command> operations are replicated for |
| 5351 | + tables in the publication.</entry> |
| 5352 | + </row> |
| 5353 | + |
| 5354 | + <row> |
| 5355 | + <entry><structfield>pubupdate</structfield></entry> |
| 5356 | + <entry><type>bool</type></entry> |
| 5357 | + <entry></entry> |
| 5358 | + <entry>If true, <command>UPDATE</command> operations are replicated for |
| 5359 | + tables in the publication.</entry> |
| 5360 | + </row> |
| 5361 | + |
| 5362 | + <row> |
| 5363 | + <entry><structfield>pubdelete</structfield></entry> |
| 5364 | + <entry><type>bool</type></entry> |
| 5365 | + <entry></entry> |
| 5366 | + <entry>If true, <command>DELETE</command> operations are replicated for |
| 5367 | + tables in the publication.</entry> |
| 5368 | + </row> |
| 5369 | + </tbody> |
| 5370 | + </tgroup> |
| 5371 | + </table> |
| 5372 | + </sect1> |
| 5373 | + |
| 5374 | + <sect1 id="catalog-pg-publication-rel"> |
| 5375 | + <title><structname>pg_publication_rel</structname></title> |
| 5376 | + |
| 5377 | + <indexterm zone="catalog-pg-publication-rel"> |
| 5378 | + <primary>pg_publication_rel</primary> |
| 5379 | + </indexterm> |
| 5380 | + |
| 5381 | + <para> |
| 5382 | + The catalog <structname>pg_publication_rel</structname> contains the |
| 5383 | + mapping between relations and publications in the database. This is a |
| 5384 | + many-to-many mapping. See also <xref linkend="view-pg-publication-tables"> |
| 5385 | + for a more user-friendly view of this information. |
| 5386 | + </para> |
| 5387 | + |
| 5388 | + <table> |
| 5389 | + <title><structname>pg_publication_rel</structname> Columns</title> |
| 5390 | + |
| 5391 | + <tgroup cols="4"> |
| 5392 | + <thead> |
| 5393 | + <row> |
| 5394 | + <entry>Name</entry> |
| 5395 | + <entry>Type</entry> |
| 5396 | + <entry>References</entry> |
| 5397 | + <entry>Description</entry> |
| 5398 | + </row> |
| 5399 | + </thead> |
| 5400 | + |
| 5401 | + <tbody> |
| 5402 | + <row> |
| 5403 | + <entry><structfield>prpubid</structfield></entry> |
| 5404 | + <entry><type>oid</type></entry> |
| 5405 | + <entry><literal><link linkend="catalog-pg-publication"><structname>pg_publication</structname></link>.oid</literal></entry> |
| 5406 | + <entry>Reference to publication</entry> |
| 5407 | + </row> |
| 5408 | + |
| 5409 | + <row> |
| 5410 | + <entry><structfield>prrelid</structfield></entry> |
| 5411 | + <entry><type>oid</type></entry> |
| 5412 | + <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.oid</literal></entry> |
| 5413 | + <entry>Reference to relation</entry> |
| 5414 | + </row> |
| 5415 | + </tbody> |
| 5416 | + </tgroup> |
| 5417 | + </table> |
| 5418 | + </sect1> |
| 5419 | + |
5274 | 5420 | <sect1 id="catalog-pg-range">
|
5275 | 5421 | <title><structname>pg_range</structname></title>
|
5276 | 5422 |
|
|
6150 | 6296 |
|
6151 | 6297 | </sect1>
|
6152 | 6298 |
|
| 6299 | + <sect1 id="catalog-pg-subscription"> |
| 6300 | + <title><structname>pg_subscription</structname></title> |
| 6301 | + |
| 6302 | + <indexterm zone="catalog-pg-subscription"> |
| 6303 | + <primary>pg_subscription</primary> |
| 6304 | + </indexterm> |
| 6305 | + |
| 6306 | + <para> |
| 6307 | + The catalog <structname>pg_subscription</structname> contains all existing |
| 6308 | + logical replication subscriptions. For more information about logical |
| 6309 | + replication see <xref linkend="logical-replication">. |
| 6310 | + </para> |
| 6311 | + |
| 6312 | + <para> |
| 6313 | + Unlike most system catalogs, <structname>pg_subscription</structname> is |
| 6314 | + shared across all databases of a cluster: There is only one copy |
| 6315 | + of <structname>pg_subscription</structname> per cluster, not one per |
| 6316 | + database. |
| 6317 | + </para> |
| 6318 | + |
| 6319 | + <para> |
| 6320 | + Access to this catalog is restricted from normal users. Normal users can |
| 6321 | + use the view <xref linkend="pg-stat-subscription"> to get some information |
| 6322 | + about subscriptions. |
| 6323 | + </para> |
| 6324 | + |
| 6325 | + <table> |
| 6326 | + <title><structname>pg_subscription</structname> Columns</title> |
| 6327 | + |
| 6328 | + <tgroup cols="4"> |
| 6329 | + <thead> |
| 6330 | + <row> |
| 6331 | + <entry>Name</entry> |
| 6332 | + <entry>Type</entry> |
| 6333 | + <entry>References</entry> |
| 6334 | + <entry>Description</entry> |
| 6335 | + </row> |
| 6336 | + </thead> |
| 6337 | + |
| 6338 | + <tbody> |
| 6339 | + <row> |
| 6340 | + <entry><structfield>oid</structfield></entry> |
| 6341 | + <entry><type>oid</type></entry> |
| 6342 | + <entry></entry> |
| 6343 | + <entry>Row identifier (hidden attribute; must be explicitly selected)</entry> |
| 6344 | + </row> |
| 6345 | + |
| 6346 | + <row> |
| 6347 | + <entry><structfield>subdbid</structfield></entry> |
| 6348 | + <entry><type>oid</type></entry> |
| 6349 | + <entry><literal><link linkend="catalog-pg-database"><structname>pg_database</structname></link>.oid</literal></entry> |
| 6350 | + <entry>OID of the database which the subscription resides in</entry> |
| 6351 | + </row> |
| 6352 | + |
| 6353 | + <row> |
| 6354 | + <entry><structfield>subname</structfield></entry> |
| 6355 | + <entry><type>name</type></entry> |
| 6356 | + <entry></entry> |
| 6357 | + <entry>Name of the subscription</entry> |
| 6358 | + </row> |
| 6359 | + |
| 6360 | + <row> |
| 6361 | + <entry><structfield>subowner</structfield></entry> |
| 6362 | + <entry><type>oid</type></entry> |
| 6363 | + <entry><literal><link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.oid</literal></entry> |
| 6364 | + <entry>Owner of the subscription</entry> |
| 6365 | + </row> |
| 6366 | + |
| 6367 | + <row> |
| 6368 | + <entry><structfield>subenabled</structfield></entry> |
| 6369 | + <entry><type>bool</type></entry> |
| 6370 | + <entry></entry> |
| 6371 | + <entry>If true, the subscription is enabled and should be replicating.</entry> |
| 6372 | + </row> |
| 6373 | + |
| 6374 | + <row> |
| 6375 | + <entry><structfield>subconninfo</structfield></entry> |
| 6376 | + <entry><type>text</type></entry> |
| 6377 | + <entry></entry> |
| 6378 | + <entry>Connection string to the upstream database</entry> |
| 6379 | + </row> |
| 6380 | + |
| 6381 | + <row> |
| 6382 | + <entry><structfield>subslotname</structfield></entry> |
| 6383 | + <entry><type>name</type></entry> |
| 6384 | + <entry></entry> |
| 6385 | + <entry>Name of the replication slot in the upstream database. Also used |
| 6386 | + for local replication origin name.</entry> |
| 6387 | + </row> |
| 6388 | + |
| 6389 | + <row> |
| 6390 | + <entry><structfield>subpublications</structfield></entry> |
| 6391 | + <entry><type>text[]</type></entry> |
| 6392 | + <entry></entry> |
| 6393 | + <entry>Array of subscribed publication names. These reference the |
| 6394 | + publications on the publisher server. For more on publications |
| 6395 | + see <xref linkend="logical-replication-publication">. |
| 6396 | + </entry> |
| 6397 | + </row> |
| 6398 | + </tbody> |
| 6399 | + </tgroup> |
| 6400 | + </table> |
| 6401 | + </sect1> |
6153 | 6402 |
|
6154 | 6403 | <sect1 id="catalog-pg-tablespace">
|
6155 | 6404 | <title><structname>pg_tablespace</structname></title>
|
|
7589 | 7838 | <entry>prepared transactions</entry>
|
7590 | 7839 | </row>
|
7591 | 7840 |
|
| 7841 | + <row> |
| 7842 | + <entry><link linkend="view-pg-publication-tables"><structname>pg_publication_tables</structname></link></entry> |
| 7843 | + <entry>publications and their associated tables</entry> |
| 7844 | + </row> |
| 7845 | + |
7592 | 7846 | <row>
|
7593 | 7847 | <entry><link linkend="view-pg-replication-origin-status"><structname>pg_replication_origin_status</structname></link></entry>
|
7594 | 7848 | <entry>information about replication origins, including replication progress</entry>
|
@@ -8871,6 +9125,61 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
|
8871 | 9125 |
|
8872 | 9126 | </sect1>
|
8873 | 9127 |
|
| 9128 | + <sect1 id="view-pg-publication-tables"> |
| 9129 | + <title><structname>pg_publication_tables</structname></title> |
| 9130 | + |
| 9131 | + <indexterm zone="view-pg-publication-tables"> |
| 9132 | + <primary>pg_publication_tables</primary> |
| 9133 | + </indexterm> |
| 9134 | + |
| 9135 | + <para> |
| 9136 | + The view <structname>pg_publication_tables</structname> provides |
| 9137 | + information about the mapping between publications and the tables they |
| 9138 | + contain. Unlike the underlying |
| 9139 | + catalog <structname>pg_publication_rel</structname>, this view expands |
| 9140 | + publications defined as <literal>FOR ALL TABLES</literal>, so for such |
| 9141 | + publications there will be a row for each eligible table. |
| 9142 | + </para> |
| 9143 | + |
| 9144 | + <table> |
| 9145 | + <title><structname>pg_publication_tables</structname> Columns</title> |
| 9146 | + |
| 9147 | + <tgroup cols="4"> |
| 9148 | + <thead> |
| 9149 | + <row> |
| 9150 | + <entry>Name</entry> |
| 9151 | + <entry>Type</entry> |
| 9152 | + <entry>References</entry> |
| 9153 | + <entry>Description</entry> |
| 9154 | + </row> |
| 9155 | + </thead> |
| 9156 | + |
| 9157 | + <tbody> |
| 9158 | + <row> |
| 9159 | + <entry><structfield>pubname</structfield></entry> |
| 9160 | + <entry><type>name</type></entry> |
| 9161 | + <entry><literal><link linkend="catalog-pg-publication"><structname>pg_publication</structname></link>.pubname</literal></entry> |
| 9162 | + <entry>Name of publication</entry> |
| 9163 | + </row> |
| 9164 | + |
| 9165 | + <row> |
| 9166 | + <entry><structfield>schemaname</structfield></entry> |
| 9167 | + <entry><type>name</type></entry> |
| 9168 | + <entry><literal><link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.nspname</literal></entry> |
| 9169 | + <entry>Name of schema containing table</entry> |
| 9170 | + </row> |
| 9171 | + |
| 9172 | + <row> |
| 9173 | + <entry><structfield>tablename</structfield></entry> |
| 9174 | + <entry><type>name</type></entry> |
| 9175 | + <entry><literal><link linkend="catalog-pg-class"><structname>pg_class</structname></link>.relname</literal></entry> |
| 9176 | + <entry>Name of table</entry> |
| 9177 | + </row> |
| 9178 | + </tbody> |
| 9179 | + </tgroup> |
| 9180 | + </table> |
| 9181 | + </sect1> |
| 9182 | + |
8874 | 9183 | <sect1 id="view-pg-replication-origin-status">
|
8875 | 9184 | <title><structname>pg_replication_origin_status</structname></title>
|
8876 | 9185 |
|
|
0 commit comments