Re: introduce dynamic shared memory registry

Nikita Malakhov <hukutoc@gmail.com>

From: Nikita Malakhov <hukutoc@gmail.com>
To: Andrei Lepikhov <a.lepikhov@postgrespro.ru>
Cc: Nathan Bossart <nathandbossart@gmail.com>, pgsql-hackers@postgresql.org
Date: 2023-12-18T09:05:28Z
Lists: pgsql-hackers
Hi!

This patch looks like a good solution for a pain in the ass, I'm too for
this patch to be committed.
Have looked through the code and agree with Andrei, the code looks good.
Just a suggestion - maybe it is worth adding a function for detaching the
segment,
for cases when we unload and/or re-load the extension?

--
Regards,
Nikita Malakhov
Postgres Professional
The Russian Postgres Company
https://postgrespro.ru/

Commits

  1. Fix possible NULL pointer dereference in GetNamedDSMSegment().

  2. Teach autoprewarm to use the dynamic shared memory registry.

  3. Introduce the dynamic shared memory registry.

  4. doc: Reorganize section for shared memory and LWLocks.