maximum number of subscriptions from the subscriber side

From: Wim Bertels <wim(dot)bertels(at)ucll(dot)be>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: maximum number of subscriptions from the subscriber side
Date: 2020-05-27 17:06:42
Message-ID: 5294e137525806ff1ae7e2a0bb23a7db2594e1b7.camel@ucll.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

Using the built in logical replication.

I am trying out a small stress test,
with a 100 subscriptions to 1 publication between 2 servers
(1 database per subscription on the subscriber side)

All the 100 slots are made, visible on the publication and subscription
server, but only 10 subscriptions were active at first?

Based on:
https://www.postgresql.org/docs/current/runtime-config-replication.html
point 19.6.4
i have adapted these settings in the subscription side:

max_sync_workers_per_subscription | 2
max_logical_replication_workers | 128
max_worker_processes | 136

But i noticed i also needed to change (on the subscriber server):
max_replication_slots (default 10) to a least 100
for all the 100 subscriptions to actually work.
(otherwise there were only 10 active subscription processes)

This wasn't clear for me from the documentation,
but probably i missed something?

PS: while testing this, the main for the publishing server seems cpu
$w
19:03:28 up 15 days, 3:47, 3 users, load average: 46,77, 63,02,
39,37
(in case of a publishing server with very little writes, 4 cores! and
8GB ram; ram seemed fine though)
PPS: this is a special use, this not a regular one.

--
mvg,
Wim

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2020-05-27 17:29:54 Re: suggestion the process to sync the data from PROD DB to Staging environment
Previous Message Karsten Hilbert 2020-05-27 16:54:53 Re: Suggestion to Monitoring Tool