Re: shmem_startup_hook called twice on Windows

Sami Imseih <samimseih@gmail.com>

From: Sami Imseih <samimseih@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-09-08T21:31:43Z
Lists: pgsql-hackers
> I quickly put together a patch for the stuff we've discussed in this
> thread.  WDYT?
>
> --
> nathan

I still think we need to mention EXEC_BACKEND somehow.
The way it's done in [0], it says "On Windows (and anywhere else
where EXEC_BACKEND is defined)"

So we do have precedent of mentioning EXEC_BACKEND in docs,
and it’s clearer than the ambiguity of saying
'on some builds'/'in other builds'.


[0] https://www.postgresql.org/docs/current/bgworker.html

-- 
Sami



Commits

  1. Fix documentation for shmem_startup_hook.

  2. test_slru: Fix LWLock tranche allocation in EXEC_BACKEND builds.

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

  4. Refactor CreateSharedMemoryAndSemaphores