Re: Some shared memory chunks are allocated even if related processes won't start - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some shared memory chunks are allocated even if related processes won't start
Date
Msg-id 3502627.1709530432@sss.pgh.pa.us
Whole thread Raw
In response to Some shared memory chunks are allocated even if related processes won't start  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses RE: Some shared memory chunks are allocated even if related processes won't start
List pgsql-hackers
"Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com> writes:
> While reading codes, I found that ApplyLauncherShmemInit() and AutoVacuumShmemInit()
> are always called even if they would not be launched.
> It may be able to reduce the start time to avoid the unnecessary allocation.

Why would this be a good idea?  It would require preventing the
decision not to launch them from being changed later, except via
postmaster restart.  We've generally been trying to move away
from unchangeable-without-restart decisions.  In your example,

> +    if (max_logical_replication_workers == 0 || IsBinaryUpgrade)
> +        return;

max_logical_replication_workers is already PGC_POSTMASTER so there's
not any immediate loss of flexibility, but I don't think it's a great
idea to introduce another reason why it has to be PGC_POSTMASTER.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: a wrong index choose when statistics is out of date
Next
From: Amul Sul
Date:
Subject: Re: Add system identifier to backup manifest