git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 0de13bb) | patch
process startup: Always call Init[Auxiliary]Process() before BaseInit().
Thu, 5 Aug 2021 21:37:09 +0000 (14:37 -0700)
Thu, 5 Aug 2021 22:36:59 +0000 (15:36 -0700)
commit b406478b87e2234c0be4ca4105eee3bb466a646b
process startup: Always call Init[Auxiliary]Process() before BaseInit().

For EXEC_BACKEND InitProcess()/InitAuxiliaryProcess() needs to have been
called well before we call BaseInit(), as SubPostmasterMain() needs LWLocks to
work. Having the order of initialization differ between platforms makes it
unnecessarily hard to understand the system and to add initialization points
for new subsystems without a lot of duplication.

To be able to change the order, BaseInit() cannot trigger
CreateSharedMemoryAndSemaphores() anymore - obviously that needs to have
happened before we can call InitProcess(). It seems cleaner to create shared
memory explicitly in single user/bootstrap mode anyway.

After this change the separation of bufmgr initialization into
InitBufferPoolAccess() / InitBufferPoolBackend() is not meaningful anymore so
the latter is removed.

Author: Andres Freund <andres@anarazel.de>
Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/20210802164124.ufo5buo4apl6yuvs@alap3.anarazel.de
src/backend/bootstrap/bootstrap.c diff | blob | blame | history
src/backend/postmaster/autovacuum.c diff | blob | blame | history
src/backend/postmaster/auxprocess.c diff | blob | blame | history
src/backend/postmaster/bgworker.c diff | blob | blame | history
src/backend/storage/buffer/bufmgr.c diff | blob | blame | history
src/backend/tcop/postgres.c diff | blob | blame | history
src/backend/utils/init/postinit.c diff | blob | blame | history
src/include/storage/bufmgr.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /