Hi, On 2022-02-03 14:35:10 +0900, Masahiko Sawada wrote: > Yes, but if we use shmem IPC, we need to allocate shared memory for > them based on the number of subscriptions, not logical replication > workers (i.e., max_logical_replication_workers). So we cannot estimate > memory in the beginning. Also, IIUC the number of subscriptions that > are concurrently working is limited by max_replication_slots (see > ReplicationStateCtl) but I think we need to remember the state of > disabled subscriptions too.
Use dshash (i.e. dsm) with a small initial allocation in non-dynamic shared memory... Greetings, Andres Freund