Log Message:
-----------
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.
Modified Files:
--------------
pgsql/src/backend/port:
sysv_shmem.c (r1.40 -> r1.41)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/port/sysv_shmem.c.diff?r1=1.40&r2=1.41)
pgsql/src/backend/postmaster:
postmaster.c (r1.440 -> r1.441)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c.diff?r1=1.440&r2=1.441)
pgsql/src/backend/storage/file:
fd.c (r1.113 -> r1.114)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/file/fd.c.diff?r1=1.113&r2=1.114)
pgsql/src/backend/storage/ipc:
ipci.c (r1.72 -> r1.73)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/ipci.c.diff?r1=1.72&r2=1.73)
pgsql/src/include/postmaster:
postmaster.h (r1.7 -> r1.8)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/postmaster/postmaster.h.diff?r1=1.7&r2=1.8)
pgsql/src/include/storage:
ipc.h (r1.68 -> r1.69)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/ipc.h.diff?r1=1.68&r2=1.69)
pg_shmem.h (r1.12 -> r1.13)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/pg_shmem.h.diff?r1=1.12&r2=1.13)
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings