]> begriffs open source - ai-pg/blob - full-docs/html/logical-replication-config.html
Include links to all subsection html pages, with shorter paths too
[ai-pg] / full-docs / html / logical-replication-config.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>29.12. Configuration Settings</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="logical-replication-security.html" title="29.11. Security" /><link rel="next" href="logical-replication-upgrade.html" title="29.13. Upgrade" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">29.12. Configuration Settings</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="logical-replication-security.html" title="29.11. Security">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="logical-replication.html" title="Chapter 29. Logical Replication">Up</a></td><th width="60%" align="center">Chapter 29. Logical Replication</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="logical-replication-upgrade.html" title="29.13. Upgrade">Next</a></td></tr></table><hr /></div><div class="sect1" id="LOGICAL-REPLICATION-CONFIG"><div class="titlepage"><div><div><h2 class="title" style="clear: both">29.12. Configuration Settings <a href="#LOGICAL-REPLICATION-CONFIG" class="id_link">#</a></h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="logical-replication-config.html#LOGICAL-REPLICATION-CONFIG-PUBLISHER">29.12.1. Publishers</a></span></dt><dt><span class="sect2"><a href="logical-replication-config.html#LOGICAL-REPLICATION-CONFIG-SUBSCRIBER">29.12.2. Subscribers</a></span></dt></dl></div><p>
3    Logical replication requires several configuration options to be set. These
4    options are relevant only on one side of the replication.
5   </p><div class="sect2" id="LOGICAL-REPLICATION-CONFIG-PUBLISHER"><div class="titlepage"><div><div><h3 class="title">29.12.1. Publishers <a href="#LOGICAL-REPLICATION-CONFIG-PUBLISHER" class="id_link">#</a></h3></div></div></div><p>
6     <a class="link" href="runtime-config-wal.html#GUC-WAL-LEVEL"><code class="varname">wal_level</code></a> must be
7     set to <code class="literal">logical</code>.
8    </p><p>
9     <a class="link" href="runtime-config-replication.html#GUC-MAX-REPLICATION-SLOTS"><code class="varname">max_replication_slots</code></a>
10     must be set to at least the number of subscriptions expected to connect,
11     plus some reserve for table synchronization.
12    </p><p>
13     Logical replication slots are also affected by
14     <a class="link" href="runtime-config-replication.html#GUC-IDLE-REPLICATION-SLOT-TIMEOUT"><code class="varname">idle_replication_slot_timeout</code></a>.
15    </p><p>
16     <a class="link" href="runtime-config-replication.html#GUC-MAX-WAL-SENDERS"><code class="varname">max_wal_senders</code></a>
17     should be set to at least the same as
18     <code class="varname">max_replication_slots</code>, plus the number of physical
19     replicas that are connected at the same time.
20    </p><p>
21     Logical replication walsender is also affected by
22     <a class="link" href="runtime-config-replication.html#GUC-WAL-SENDER-TIMEOUT"><code class="varname">wal_sender_timeout</code></a>.
23    </p></div><div class="sect2" id="LOGICAL-REPLICATION-CONFIG-SUBSCRIBER"><div class="titlepage"><div><div><h3 class="title">29.12.2. Subscribers <a href="#LOGICAL-REPLICATION-CONFIG-SUBSCRIBER" class="id_link">#</a></h3></div></div></div><p>
24     <a class="link" href="runtime-config-replication.html#GUC-MAX-ACTIVE-REPLICATION-ORIGINS"><code class="varname">max_active_replication_origins</code></a>
25     must be set to at least the number of subscriptions that will be added to
26     the subscriber, plus some reserve for table synchronization.
27    </p><p>
28     <a class="link" href="runtime-config-replication.html#GUC-MAX-LOGICAL-REPLICATION-WORKERS"><code class="varname">max_logical_replication_workers</code></a>
29     must be set to at least the number of subscriptions (for leader apply
30     workers), plus some reserve for the table synchronization workers and
31     parallel apply workers.
32    </p><p>
33     <a class="link" href="runtime-config-resource.html#GUC-MAX-WORKER-PROCESSES"><code class="varname">max_worker_processes</code></a>
34     may need to be adjusted to accommodate for replication workers, at least
35     (<a class="link" href="runtime-config-replication.html#GUC-MAX-LOGICAL-REPLICATION-WORKERS"><code class="varname">max_logical_replication_workers</code></a>
36     + <code class="literal">1</code>). Note, some extensions and parallel queries also
37     take worker slots from <code class="varname">max_worker_processes</code>.
38    </p><p>
39     <a class="link" href="runtime-config-replication.html#GUC-MAX-SYNC-WORKERS-PER-SUBSCRIPTION"><code class="varname">max_sync_workers_per_subscription</code></a>
40      controls the amount of parallelism of the initial data copy during the
41      subscription initialization or when new tables are added.
42    </p><p>
43     <a class="link" href="runtime-config-replication.html#GUC-MAX-PARALLEL-APPLY-WORKERS-PER-SUBSCRIPTION"><code class="varname">max_parallel_apply_workers_per_subscription</code></a>
44      controls the amount of parallelism for streaming of in-progress
45      transactions with subscription parameter
46      <code class="literal">streaming = parallel</code>.
47    </p><p>
48     Logical replication workers are also affected by
49     <a class="link" href="runtime-config-replication.html#GUC-WAL-RECEIVER-TIMEOUT"><code class="varname">wal_receiver_timeout</code></a>,
50     <a class="link" href="runtime-config-replication.html#GUC-WAL-RECEIVER-STATUS-INTERVAL"><code class="varname">wal_receiver_status_interval</code></a> and
51     <a class="link" href="runtime-config-replication.html#GUC-WAL-RETRIEVE-RETRY-INTERVAL"><code class="varname">wal_retrieve_retry_interval</code></a>.
52    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="logical-replication-security.html" title="29.11. Security">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="logical-replication.html" title="Chapter 29. Logical Replication">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="logical-replication-upgrade.html" title="29.13. Upgrade">Next</a></td></tr><tr><td width="40%" align="left" valign="top">29.11. Security </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"> 29.13. Upgrade</td></tr></table></div></body></html>