Re: Proposal: Add a callback data parameter to GetNamedDSMSegment
Sami Imseih <samimseih@gmail.com>
From: Sami Imseih <samimseih@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Zsolt Parragi <zsolt.parragi@percona.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-03T20:59:16Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow passing a pointer to GetNamedDSMSegment()'s init callback.
- 48d4a1423d2e 19 (unreleased) landed
-
Move dynamically-allocated LWLock tranche names to shared memory.
- 38b602b0289f 19 (unreleased) cited
> On Wed, Dec 03, 2025 at 02:27:29PM -0600, Sami Imseih wrote: > > There are probably other good reasons to allow a generic argument > > to the init callback. Besides the lwlock name, I can see someone > > wanting to pass some other initialization info that may vary > > depending on extension GUCs, etc. > > The value of a GUC could be obtained in the callback via the global > variable or GetConfigOption(), right? Yes, that's true. It will be hard to find other good use-cases that can't be solved with a global variable, but we can also say this is a low-cost change, so why not just do it. -- Sami