]> begriffs open source - ai-pg/blob - full-docs/txt/logical-replication-config.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / logical-replication-config.txt
1
2 29.12. Configuration Settings #
3
4    29.12.1. Publishers
5    29.12.2. Subscribers
6
7    Logical replication requires several configuration options to be set.
8    These options are relevant only on one side of the replication.
9
10 29.12.1. Publishers #
11
12    wal_level must be set to logical.
13
14    max_replication_slots must be set to at least the number of
15    subscriptions expected to connect, plus some reserve for table
16    synchronization.
17
18    Logical replication slots are also affected by
19    idle_replication_slot_timeout.
20
21    max_wal_senders should be set to at least the same as
22    max_replication_slots, plus the number of physical replicas that are
23    connected at the same time.
24
25    Logical replication walsender is also affected by wal_sender_timeout.
26
27 29.12.2. Subscribers #
28
29    max_active_replication_origins must be set to at least the number of
30    subscriptions that will be added to the subscriber, plus some reserve
31    for table synchronization.
32
33    max_logical_replication_workers must be set to at least the number of
34    subscriptions (for leader apply workers), plus some reserve for the
35    table synchronization workers and parallel apply workers.
36
37    max_worker_processes may need to be adjusted to accommodate for
38    replication workers, at least (max_logical_replication_workers + 1).
39    Note, some extensions and parallel queries also take worker slots from
40    max_worker_processes.
41
42    max_sync_workers_per_subscription controls the amount of parallelism of
43    the initial data copy during the subscription initialization or when
44    new tables are added.
45
46    max_parallel_apply_workers_per_subscription controls the amount of
47    parallelism for streaming of in-progress transactions with subscription
48    parameter streaming = parallel.
49
50    Logical replication workers are also affected by wal_receiver_timeout,
51    wal_receiver_status_interval and wal_retrieve_retry_interval.