Refactor EXEC_BACKEND code so that postmaster child processes reattach
authorTom Lane <[email protected]>
Wed, 29 Dec 2004 21:36:09 +0000 (21:36 +0000)
committerTom Lane <[email protected]>
Wed, 29 Dec 2004 21:36:09 +0000 (21:36 +0000)
commitbd8dce9e63b49de98e44e74bf9d043042120abb0
treeeac9f1f290ff13b7e8f3b7a7bdc3f9b3a004854d
parent158e570c4cac2ddb37edf6500f7de1153db78a78
Refactor EXEC_BACKEND code so that postmaster child processes reattach
to shared memory as soon as possible, ie, right after read_backend_variables.
The effective difference from the original code is that this happens
before instead of after read_nondefault_variables(), which loads GUC
information and is apparently capable of expanding the backend's memory
allocation more than you'd think it should.  This should fix the
failure-to-attach-to-shared-memory reports we've been seeing on Windows.
Also clean up a few bits of unnecessarily grotty EXEC_BACKEND code.
src/backend/port/sysv_shmem.c
src/backend/postmaster/postmaster.c
src/backend/storage/file/fd.c
src/backend/storage/ipc/ipci.c
src/include/postmaster/postmaster.h
src/include/storage/ipc.h
src/include/storage/pg_shmem.h