codekingpro/portable-devtools
114k
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>53.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="53.53. pg_statistic_ext_data" /><link rel="next" href="catalog-pg-subscription-rel.html" title="53.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">53.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="53.53. pg_statistic_ext_data">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="catalogs.html" title="Chapter 53. System Catalogs">Up</a></td><th width="60%" align="center">Chapter 53. System Catalogs</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="catalog-pg-subscription-rel.html" title="53.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">53.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 existing4 logical replication subscriptions. For more information about logical5 replication see <a class="xref" href="logical-replication.html" title="Chapter 31. Logical Replication">Chapter 31</a>.6 </p><p>7 Unlike most system catalogs, <code class="structname">pg_subscription</code> is8 shared across all databases of a cluster: there is only one copy9 of <code class="structname">pg_subscription</code> per cluster, not one per10 database.11 </p><p>12 Access to the column <code class="structfield">subconninfo</code> is revoked from13 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 53.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 Type16 </p>17 <p>18 Description19 </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 identifier24 </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="53.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 in30 </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 valid35 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 subscription41 </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="53.8. pg_authid"><code class="structname">pg_authid</code></a>.<code class="structfield">oid</code>)44 </p>45 <p>46 Owner of the subscription47 </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 replicating52 </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 data57 in binary format58 </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 to65 disk and apply at once after the transaction is committed on the66 publisher and received by the subscriber,67 <code class="literal">p</code> = apply changes directly using a parallel apply68 worker if available (same as 't' if no worker is available)69 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">70 <code class="structfield">subtwophasestate</code> <code class="type">char</code>71 </p>72 <p>73 State codes for two-phase mode:74 <code class="literal">d</code> = disabled,75 <code class="literal">p</code> = pending enablement,76 <code class="literal">e</code> = enabled77 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">78 <code class="structfield">subdisableonerr</code> <code class="type">bool</code>79 </p>80 <p>81 If true, the subscription will be disabled if one of its workers82 detects an error83 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">84 <code class="structfield">subpasswordrequired</code> <code class="type">bool</code>85 </p>86 <p>87 If true, the subscription will be required to specify a password88 for authentication89 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">90 <code class="structfield">subrunasowner</code> <code class="type">bool</code>91 </p>92 <p>93 If true, the subscription will be run with the permissions94 of the subscription owner95 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">96 <code class="structfield">subconninfo</code> <code class="type">text</code>97 </p>98 <p>99 Connection string to the upstream database100 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">101 <code class="structfield">subslotname</code> <code class="type">name</code>102 </p>103 <p>104 Name of the replication slot in the upstream database (also used105 for the local replication origin name);106 null represents <code class="literal">NONE</code>107 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">108 <code class="structfield">subsynccommit</code> <code class="type">text</code>109 </p>110 <p>111 The <code class="varname">synchronous_commit</code>112 setting for the subscription's workers to use113 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">114 <code class="structfield">subpublications</code> <code class="type">text[]</code>115 </p>116 <p>117 Array of subscribed publication names. These reference118 publications defined in the upstream database. For more on publications119 see <a class="xref" href="logical-replication-publication.html" title="31.1. Publication">Section 31.1</a>.120 </p></td></tr><tr><td class="catalog_table_entry"><p class="column_definition">121 <code class="structfield">suborigin</code> <code class="type">text</code>122 </p>123 <p>124 The origin value must be either <code class="literal">none</code> or125 <code class="literal">any</code>. The default is <code class="literal">any</code>.126 If <code class="literal">none</code>, the subscription will request the publisher127 to only send changes that don't have an origin. If128 <code class="literal">any</code>, the publisher sends changes regardless of their129 origin.130 </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="53.53. pg_statistic_ext_data">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="catalogs.html" title="Chapter 53. System Catalogs">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="catalog-pg-subscription-rel.html" title="53.55. pg_subscription_rel">Next</a></td></tr><tr><td width="40%" align="left" valign="top">53.53. <code class="structname">pg_statistic_ext_data</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 53.55. <code class="structname">pg_subscription_rel</code></td></tr></table></div></body></html>