Create a "shmem_startup_hook" to be called at the end of shared memory
authorTom Lane <[email protected]>
Sat, 3 Jan 2009 17:08:39 +0000 (17:08 +0000)
committerTom Lane <[email protected]>
Sat, 3 Jan 2009 17:08:39 +0000 (17:08 +0000)
commitda47a3aa7da4cb9fb3e110a6262457572cdb86fe
treeb0b655bb53734be9c06927674563fcc9447c10b5
parentf39ee05b9764cb143f469630b0b9dca271972f71
Create a "shmem_startup_hook" to be called at the end of shared memory
initialization, to give loadable modules a reasonable place to perform
creation of any shared memory areas they need.  This is the logical conclusion
of our previous creation of RequestAddinShmemSpace() and RequestAddinLWLocks().
We don't need an explicit shmem_shutdown_hook, because the existing
on_shmem_exit and on_proc_exit mechanisms serve that need.

Also, adjust SubPostmasterMain so that libraries that got loaded into the
postmaster will be loaded into all child processes, not only regular backends.
This improves consistency with the non-EXEC_BACKEND behavior, and might be
necessary for functionality for some types of add-ons.
src/backend/postmaster/postmaster.c
src/backend/storage/ipc/ipci.c
src/include/storage/ipc.h