codekingpro/portable-devtools
114k
1
2
3<!DOCTYPE html>
4
5<html lang="en" data-content_root="./">
6 <head>
7 <meta charset="utf-8" />
8 <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
9
10 <title>Subscription Dialog — pgAdmin 4 8.6 documentation</title>
11 <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
12 <link rel="stylesheet" type="text/css" href="_static/style.css?v=d36593c3" />
13
14 <script src="_static/documentation_options.js?v=d4c83366"></script>
15 <script src="_static/doctools.js?v=9a2dae69"></script>
16 <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
17
18 <script src="_static/sidebar.js"></script>
19
20 <link rel="index" title="Index" href="genindex.html" />
21 <link rel="search" title="Search" href="search.html" />
22 <link rel="next" title="Synonym Dialog" href="synonym_dialog.html" />
23 <link rel="prev" title="Sequence Dialog" href="sequence_dialog.html" />
24 </head><body>
25 <div class="related" role="navigation" aria-label="related navigation">
26 <h3>Navigation</h3>
27 <ul>
28 <li class="right" style="margin-right: 10px">
29 <a href="genindex.html" title="General Index"
30 accesskey="I">index</a></li>
31 <li class="right" >
32 <a href="synonym_dialog.html" title="Synonym Dialog"
33 accesskey="N">next</a> |</li>
34 <li class="right" >
35 <a href="sequence_dialog.html" title="Sequence Dialog"
36 accesskey="P">previous</a> |</li>
37 <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> »</li>
38 <li class="nav-item nav-item-1"><a href="managing_database_objects.html" accesskey="U">Managing Database Objects</a> »</li>
39 <li class="nav-item nav-item-this"><a href="">Subscription Dialog</a></li>
40 </ul>
41 </div>
42
43 <div class="document">
44 <div class="documentwrapper">
45 <div class="bodywrapper">
46 <div class="body" role="main">
47
48 <section id="subscription-dialog">
49<h1><span class="target" id="index-0"></span>Subscription Dialog<a class="headerlink" href="#subscription-dialog" title="Link to this heading">¶</a></h1>
50<p>Use the <em>Subscription</em> dialog to create a subscription. A subscription defines the connection to another database and set of publications (one or more) to which it wants to subscribe.</p>
51<p>The <em>subscription</em> dialog organizes the development of a subscription through the following dialog tabs: <em>General</em>, <em>Connection</em>, <em>SSL</em> and <em>With</em>. The <em>SQL</em> tab displays the SQL code generated by dialog selections.</p>
52<img alt="Subscription dialog general tab" class="align-center" src="_images/subscription_general.png" />
53<p>Use the fields in the <em>General</em> tab to identify the subscription:</p>
54<ul class="simple">
55<li><p>Use the <em>Name</em> field to add a descriptive name for the subscription. The name will be displayed in the <em>pgAdmin</em> tree control.</p></li>
56<li><p>The <em>Owner</em> field takes the name of the user automatically as current connected user. You can change the owner after creating subscription using alter subscription. Please note that owner of the subscription has superuser privileges.</p></li>
57</ul>
58<p>Click the <em>Connection</em> tab to continue.</p>
59<img alt="Subscription dialog connection tab" class="align-center" src="_images/subscription_connection.png" />
60<p>Use the <em>Connection</em> tab to define the connection string to the publisher:</p>
61<ul class="simple">
62<li><p>Use the <em>Host name/address</em> field to provide the valid hostname or ip address of the publication.</p></li>
63<li><p>Use the <em>Port</em> field to provide port number to connect at Postgres Server in which publication is residing.</p></li>
64<li><p>Use the <em>Username</em> field to provide the name of the user to connect to the publication.</p></li>
65<li><p>Use the <em>Password</em> to provide the password of the user.</p></li>
66<li><p>Use the <em>Database</em> field to connect to the database in which publication is residing.</p></li>
67<li><p>Use the <em>Connection timeout</em> field to specify the maximum wait for connection, in seconds. Zero or not specified means wait indefinetly. It is not recommended to use a timeout of less than 2 seconds.</p></li>
68<li><p>Use the <em>Passfile</em> field to specify the location of a password file (.pgpass). A .pgpass file allows a user to login without providing a password when they connect. For more information, see <a class="reference external" href="https://www.postgresql.org/docs/current/libpq-pgpass.html">Section 33.15 of the Postgres documentation</a>.</p></li>
69<li><p>Use the <em>Publication</em> field to specify the publication name on the publishers to subscribe to. Click on the refresh button at the end to load the names of the existing publications and then select from the list. You can also write the name of the known publication in the field.</p></li>
70</ul>
71<p>Click the <em>SSL</em> tab to continue.</p>
72<img alt="Subscription dialog ssl tab" class="align-center" src="_images/subscription_ssl.png" />
73<p>Use the fields in the <em>SSL</em> tab to configure SSL:</p>
74<ul class="simple">
75<li><p>Use the drop-down list box in the <em>SSL</em> field to select the type of SSL
76connection the server should use. For more information about using SSL
77encryption, see
78<a class="reference external" href="https://www.postgresql.org/docs/current/libpq-ssl.html">Section 33.18 of the Postgres documentation</a>.</p></li>
79</ul>
80<p>If pgAdmin is installed in Server mode (the default mode), you can use the
81platform-specific File manager dialog to upload files that support SSL
82encryption to the server. To access the File manager dialog, click the
83icon that is located to the right of each of the following fields.</p>
84<ul class="simple">
85<li><p>Use the <em>Client certificate</em> field to specify the file containing the client
86SSL certificate. This file will replace the default
87<em>~/.postgresql/postgresql.crt</em> if pgAdmin is installed in Desktop mode, and
88<em><STORAGE_DIR>/<USERNAME>/.postgresql/postgresql.crt</em> if pgAdmin is installed
89in Web mode. This parameter is ignored if an SSL connection is not made.</p></li>
90<li><p>Use the <em>Client certificate key</em> field to specify the file containing the
91secret key used for the client certificate. This file will replace the
92default <em>~/.postgresql/postgresql.key</em> if pgAdmin is installed in Desktop
93mode, and <em><STORAGE_DIR>/<USERNAME>/.postgresql/postgresql.key</em> if pgAdmin
94is installed in Web mode. This parameter is ignored if an SSL connection is
95not made.</p></li>
96<li><p>Use the <em>Root certificate</em> field to specify the file containing the SSL
97certificate authority. This file will replace the default
98<em>~/.postgresql/root.crt</em>. This parameter is ignored if an SSL connection is
99not made.</p></li>
100<li><p>Use the <em>Certificate revocation list</em> field to specify the file containing
101the SSL certificate revocation list. This list will replace the default list,
102found in <em>~/.postgresql/root.crl</em>. This parameter is ignored if an SSL
103connection is not made.</p></li>
104<li><p>When <em>SSL compression?</em> is set to <em>True</em>, data sent over SSL connections will
105be compressed. The default value is <em>False</em> (compression is disabled). This
106parameter is ignored if an SSL connection is not made.</p></li>
107</ul>
108<div class="admonition warning">
109<p class="admonition-title">Warning</p>
110<p>In Server mode, certificates, private keys, and the revocation list
111are stored in the per-user file storage area on the server, which is owned
112by the user account under which the pgAdmin server process is run. This
113means that administrators of the server may be able to access those files;
114appropriate caution should be taken before choosing to use this feature.</p>
115</div>
116<p>Click the <em>With</em> tab to continue.</p>
117<img alt="Subscription dialog with tab" class="align-center" src="_images/subscription_with_1.png" />
118<img alt="Subscription dialog with tab" class="align-center" src="_images/subscription_with_2.png" />
119<p>Use the <em>With</em> tab to define some parameters for a subscription:</p>
120<ul class="simple">
121<li><p>The <em>Copy data?</em> switch specifies whether the existing data in the publications that are being subscribed to should be copied once the replication starts. By default it is set to <em>Yes</em>.</p></li>
122<li><p>The <em>Create slot?</em> switch specifies whether the command should create the replication slot on the publisher. By default it is set to <em>Yes</em>. Please note: if your publisher and subscriber both are inside same PostgreSQL server then is is set to <em>No</em> by default.</p></li>
123<li><p>The <em>Enabled?</em> switch specifies whether the subscription should be actively replicating, or whether it should be just setup but not started yet. By default it is set to <em>Yes</em>.</p></li>
124<li><p>The <em>Connect?</em> specifies whether the CREATE SUBSCRIPTION should connect to the publisher at all. By default, it is set to <em>Yes</em>. Setting this to <em>No</em> will change default values of enabled, create_slot and copy_data to <em>No</em>.</p></li>
125<li><p>Use the <em>Slot Name</em> field to specify the name of the replication slot to use. By default, it uses the name of the subscription for the slot name.</p></li>
126<li><p>Use the <em>Synchronous commit</em> field to override the synchronous_commit setting. By default, it is set to <em>off</em>. It is safe to use off for logical replication: If the subscriber loses transactions because of missing synchronization, the data will be sent again from the publisher.</p></li>
127<li><p>Use the <em>Streaming</em> field to specify whether to enable streaming of in-progress transactions for this subscription. The default value is <em>off</em>, meaning all transactions are fully decoded on the publisher and only then sent to the subscriber as a whole. This option is available only on PostgreSQL 14 and above.</p></li>
128<li><p>Use the <em>Binary?</em> switch to specify whether the subscription will request the publisher to send the data in binary format (as opposed to text). The default is <em>false</em>. This option is available only on PostgreSQL 14 and above.</p></li>
129<li><p>Use the <em>Two phase?</em> switch to specify whether two-phase commit is enabled for this subscription. The default is <em>false</em>. This option is available only on PostgreSQL 15 and above.</p></li>
130<li><p>Use the <em>Disable on error?</em> switch to specify whether the subscription should be automatically disabled if any errors are detected by subscription workers during data replication from the publisher. The default is <em>false</em>. This option is available only on PostgreSQL 15 and above.</p></li>
131<li><p>Move the <em>Run as owner?</em> switch to <em>true</em> position to specify all replication actions are performed as the subscription owner. If <em>false</em>, replication workers will perform actions on each table as the owner of that table. The default is <em>false</em>. This option is available only on PostgreSQL 16 and above.</p></li>
132<li><p>Use the <em>Password required?</em> to specify whether connections to the publisher made as a result of this subscription must use password authentication. This setting is ignored when the subscription is owned by a superuser. The default is true. Only superusers can set this value to <em>false</em>. This option is available only on PostgreSQL 16 and above.</p></li>
133<li><p>Use the <em>Origin</em> to specify whether the subscription will request the publisher to only send changes that don’t have an origin or send changes regardless of origin. The default is <em>any</em>. This option is available only on PostgreSQL 16 and above.</p></li>
134</ul>
135<p>Click the <em>SQL</em> tab to continue.</p>
136<p>Your entries in the <em>Subscription</em> dialog generate a SQL command (see an example below). Use the <em>SQL</em> tab for review; revisit or switch tabs to make any changes to the SQL command.</p>
137<p><strong>Example</strong></p>
138<p>The following is an example of the sql command generated by user selections in
139the <em>Subscription</em> dialog:</p>
140<img alt="Subscription dialog sql tab" class="align-center" src="_images/subscription_sql.png" />
141<p>The example creates a subscription named <em>sub1</em> that is owned by <em>postgres</em>. It will replicate the data from the publication <em>pub1</em>.</p>
142<ul class="simple">
143<li><p>Click the <em>Info</em> button (i) to access online help.</p></li>
144<li><p>Click the <em>Save</em> button to save work.</p></li>
145<li><p>Click the <em>Close</em> button to exit without saving work.</p></li>
146<li><p>Click the <em>Reset</em> button to restore all the default settings.</p></li>
147</ul>
148</section>
149
150
151 <div class="clearer"></div>
152 </div>
153 </div>
154 </div>
155 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
156 <div class="sphinxsidebarwrapper">
157<h3><a href="index.html">Table of Contents</a></h3>
158<ul class="current">
159<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
160<li class="toctree-l1"><a class="reference internal" href="external_database.html">External database for pgAdmin user settings</a></li>
161<li class="toctree-l1"><a class="reference internal" href="connecting.html">Connecting To A Server</a></li>
162<li class="toctree-l1"><a class="reference internal" href="managing_cluster_objects.html">Managing Cluster Objects</a></li>
163<li class="toctree-l1 current"><a class="reference internal" href="managing_database_objects.html">Managing Database Objects</a><ul class="current">
164<li class="toctree-l2"><a class="reference internal" href="cast_dialog.html">Cast Dialog</a></li>
165<li class="toctree-l2"><a class="reference internal" href="dbms_job_scheduler.html">Using EDB Job Scheduler</a></li>
166<li class="toctree-l2"><a class="reference internal" href="collation_dialog.html">Collation Dialog</a></li>
167<li class="toctree-l2"><a class="reference internal" href="domain_dialog.html">Domain Dialog</a></li>
168<li class="toctree-l2"><a class="reference internal" href="domain_constraint_dialog.html">Domain Constraints Dialog</a></li>
169<li class="toctree-l2"><a class="reference internal" href="event_trigger_dialog.html">Event Trigger Dialog</a></li>
170<li class="toctree-l2"><a class="reference internal" href="extension_dialog.html">Extension Dialog</a></li>
171<li class="toctree-l2"><a class="reference internal" href="foreign_data_wrapper_dialog.html">Foreign Data Wrapper Dialog</a></li>
172<li class="toctree-l2"><a class="reference internal" href="foreign_server_dialog.html">Foreign Server Dialog</a></li>
173<li class="toctree-l2"><a class="reference internal" href="foreign_table_dialog.html">Foreign Table Dialog</a></li>
174<li class="toctree-l2"><a class="reference internal" href="fts_configuration_dialog.html">FTS Configuration Dialog</a></li>
175<li class="toctree-l2"><a class="reference internal" href="fts_dictionary_dialog.html">FTS Dictionary Dialog</a></li>
176<li class="toctree-l2"><a class="reference internal" href="fts_parser_dialog.html">FTS Parser Dialog</a></li>
177<li class="toctree-l2"><a class="reference internal" href="fts_template_dialog.html">FTS Template Dialog</a></li>
178<li class="toctree-l2"><a class="reference internal" href="function_dialog.html">Function Dialog</a></li>
179<li class="toctree-l2"><a class="reference internal" href="language_dialog.html">Language Dialog</a></li>
180<li class="toctree-l2"><a class="reference internal" href="materialized_view_dialog.html">Materialized View Dialog</a></li>
181<li class="toctree-l2"><a class="reference internal" href="package_dialog.html">Package Dialog</a></li>
182<li class="toctree-l2"><a class="reference internal" href="procedure_dialog.html">Procedure Dialog</a></li>
183<li class="toctree-l2"><a class="reference internal" href="publication_dialog.html">Publication Dialog</a></li>
184<li class="toctree-l2"><a class="reference internal" href="schema_dialog.html">Schema Dialog</a></li>
185<li class="toctree-l2"><a class="reference internal" href="sequence_dialog.html">Sequence Dialog</a></li>
186<li class="toctree-l2 current"><a class="current reference internal" href="#">Subscription Dialog</a></li>
187<li class="toctree-l2"><a class="reference internal" href="synonym_dialog.html">Synonym Dialog</a></li>
188<li class="toctree-l2"><a class="reference internal" href="trigger_function_dialog.html">Trigger Function Dialog</a></li>
189<li class="toctree-l2"><a class="reference internal" href="type_dialog.html">Type Dialog</a></li>
190<li class="toctree-l2"><a class="reference internal" href="user_mapping_dialog.html">User Mapping Dialog</a></li>
191<li class="toctree-l2"><a class="reference internal" href="view_dialog.html">View Dialog</a></li>
192</ul>
193</li>
194<li class="toctree-l1"><a class="reference internal" href="modifying_tables.html">Creating or Modifying a Table</a></li>
195<li class="toctree-l1"><a class="reference internal" href="management_basics.html">Management Basics</a></li>
196<li class="toctree-l1"><a class="reference internal" href="backup_and_restore.html">Backup and Restore</a></li>
197<li class="toctree-l1"><a class="reference internal" href="developer_tools.html">Developer Tools</a></li>
198<li class="toctree-l1"><a class="reference internal" href="processes.html">Processes</a></li>
199<li class="toctree-l1"><a class="reference internal" href="pgagent.html">pgAgent</a></li>
200<li class="toctree-l1"><a class="reference internal" href="contributions.html">pgAdmin Project Contributions</a></li>
201<li class="toctree-l1"><a class="reference internal" href="release_notes.html">Release Notes</a></li>
202<li class="toctree-l1"><a class="reference internal" href="licence.html">Licence</a></li>
203</ul>
204
205<search id="searchbox" style="display: none" role="search">
206 <h3 id="searchlabel">Quick search</h3>
207 <div class="searchformwrapper">
208 <form class="search" action="search.html" method="get">
209 <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
210 <input type="submit" value="Go" />
211 </form>
212 </div>
213</search>
214<script>document.getElementById('searchbox').style.display = "block"</script>
215 </div>
216<div id="sidebarbutton" title="Collapse sidebar">
217<span>«</span>
218</div>
219
220 </div>
221 <div class="clearer"></div>
222 </div>
223 <div class="related" role="navigation" aria-label="related navigation">
224 <h3>Navigation</h3>
225 <ul>
226 <li class="right" style="margin-right: 10px">
227 <a href="genindex.html" title="General Index"
228 >index</a></li>
229 <li class="right" >
230 <a href="synonym_dialog.html" title="Synonym Dialog"
231 >next</a> |</li>
232 <li class="right" >
233 <a href="sequence_dialog.html" title="Sequence Dialog"
234 >previous</a> |</li>
235 <li class="nav-item nav-item-0"><a href="index.html">pgAdmin 4 8.6 documentation</a> »</li>
236 <li class="nav-item nav-item-1"><a href="managing_database_objects.html" >Managing Database Objects</a> »</li>
237 <li class="nav-item nav-item-this"><a href="">Subscription Dialog</a></li>
238 </ul>
239 </div>
240 <div class="footer" role="contentinfo">
241 <div class="related" role="navigation" aria-label="related navigation">
242 <ul>
243 <li class="left" style="margin-left: 10px">© Copyright (C) 2013 - 2024, The pgAdmin Development Team.</li>
244 <li class="right" style="margin-right: 10px"><a href="genindex.html" title="General Index" accesskey="I">index</a></li>
245 <li class="right" ><a href="synonym_dialog.html" title="Synonym Dialog" accesskey="N">next</a> |</li>
246 <li class="right" ><a href="sequence_dialog.html" title="Sequence Dialog" accesskey="P">previous</a> |</li>
247 </ul>
248 </div>
249 </div>
250 </body>
251</html>