Re: Design of pg_stat_subscription_workers vs pgstats - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Design of pg_stat_subscription_workers vs pgstats
Date
Msg-id 20220215162602.jclwnravu24mr7sx@alap3.anarazel.de
Whole thread Raw
In response to Re: Design of pg_stat_subscription_workers vs pgstats  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_receivewal.exe unhandled exception in zlib1.dll
Next
From: Robert Haas
Date:
Subject: Re: refactoring basebackup.c