From: Nathan Bossart <nathandbossart@gmail.com>
To: Zhang Mingli <zmlpostgres@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: introduce dynamic shared memory registry
Date: Wed, 20 Dec 2023 10:18:36 -0600
Message-ID: <20231220161836.GC833819@nathanxps13> (raw)
In-Reply-To: <99177ac8-f3cb-40eb-a8c1-b1aede77b803@Spark>
References: <20231205034647.GA2705267@nathanxps13>
<99177ac8-f3cb-40eb-a8c1-b1aede77b803@Spark>
On Thu, Dec 21, 2023 at 12:03:18AM +0800, Zhang Mingli wrote:
> I see most xxxShmemInit functions have the logic to handle IsUnderPostmaster env.
> Do we need to consider it in DSMRegistryShmemInit() too? For example, add some assertions.
> Others LGTM.
Good point. I _think_ the registry is safe to set up and use in
single-user mode but not in a regular postmaster process. It'd probably be
wise to add some assertions along those lines, but even if we didn't, I
think the DSM code has existing assertions that will catch it. In any
case, I'd like to avoid requiring folks to add special
single-user-mode-only logic if we can avoid it.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, zmlpostgres@gmail.com
Subject: Re: introduce dynamic shared memory registry
In-Reply-To: <20231220161836.GC833819@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox