Re: introduce dynamic shared memory registry - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: introduce dynamic shared memory registry
Date
Msg-id 20231219161911.GE831499@nathanxps13
Whole thread Raw
In response to Re: introduce dynamic shared memory registry  (Michael Paquier <michael@paquier.xyz>)
Responses Re: introduce dynamic shared memory registry
List pgsql-hackers
On Fri, Dec 08, 2023 at 04:36:52PM +0900, Michael Paquier wrote:
> Yes, tracking that in a more central way can have many usages, so your
> patch sounds like a good idea.  Note that we have one case in core
> that be improved and make use of what you have here: autoprewarm.c.

I'll add a patch for autoprewarm.c.  Even if we don't proceed with that
change, it'll be a good demonstration.

> +dsm_registry_init_or_attach(const char *key, void **ptr, size_t size,
> +                           void (*init_callback) (void *ptr))
> 
> This is shaped around dshash_find_or_insert(), but it looks like you'd
> want an equivalent for dshash_find(), as well.

What is the use-case for only verifying the existence of a segment?

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: introduce dynamic shared memory registry
Next
From: Ishaan Adarsh
Date:
Subject: Re: [DOC] Introducing Quick Start Guide to PL/pgSQL and PL/Python Documentation