Thread: pgsql-server: Code review for EXEC_BACKEND changes.

pgsql-server: Code review for EXEC_BACKEND changes.

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Code review for EXEC_BACKEND changes.  Reduce the number of #ifdefs by
about a third, make it work on non-Windows platforms again.  (But perhaps
I broke the WIN32 code, since I have no way to test that.)  Fold all the
paths that fork postmaster child processes to go through the single
routine SubPostmasterMain, which takes care of resurrecting the state that
would normally be inherited from the postmaster (including GUC variables).
Clean up some places where there's no particularly good reason for the
EXEC and non-EXEC cases to work differently.  Take care of one or two
FIXMEs that remained in the code.

Modified Files:
--------------
    pgsql-server/src/backend/access/transam:
        slru.c (r1.13 -> r1.14)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/transam/slru.c.diff?r1=1.13&r2=1.14)
        xlog.c (r1.143 -> r1.144)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/transam/xlog.c.diff?r1=1.143&r2=1.144)
    pgsql-server/src/backend/bootstrap:
        bootstrap.c (r1.180 -> r1.181)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/bootstrap/bootstrap.c.diff?r1=1.180&r2=1.181)
    pgsql-server/src/backend/main:
        main.c (r1.83 -> r1.84)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/main/main.c.diff?r1=1.83&r2=1.84)
    pgsql-server/src/backend/port:
        ipc_test.c (r1.12 -> r1.13)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/port/ipc_test.c.diff?r1=1.12&r2=1.13)
    pgsql-server/src/backend/postmaster:
        pgstat.c (r1.71 -> r1.72)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/postmaster/pgstat.c.diff?r1=1.71&r2=1.72)
        postmaster.c (r1.397 -> r1.398)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/postmaster/postmaster.c.diff?r1=1.397&r2=1.398)
    pgsql-server/src/backend/storage/buffer:
        buf_init.c (r1.65 -> r1.66)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/buffer/buf_init.c.diff?r1=1.65&r2=1.66)
    pgsql-server/src/backend/storage/ipc:
        ipci.c (r1.66 -> r1.67)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/ipc/ipci.c.diff?r1=1.66&r2=1.67)
    pgsql-server/src/backend/storage/lmgr:
        lmgr.c (r1.62 -> r1.63)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/lmgr/lmgr.c.diff?r1=1.62&r2=1.63)
        lock.c (r1.131 -> r1.132)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/storage/lmgr/lock.c.diff?r1=1.131&r2=1.132)
    pgsql-server/src/backend/tcop:
        postgres.c (r1.415 -> r1.416)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/tcop/postgres.c.diff?r1=1.415&r2=1.416)
    pgsql-server/src/backend/utils/init:
        globals.c (r1.87 -> r1.88)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/init/globals.c.diff?r1=1.87&r2=1.88)
    pgsql-server/src/include/access:
        slru.h (r1.4 -> r1.5)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/access/slru.h.diff?r1=1.4&r2=1.5)
    pgsql-server/src/include/bootstrap:
        bootstrap.h (r1.33 -> r1.34)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/bootstrap/bootstrap.h.diff?r1=1.33&r2=1.34)
    pgsql-server/src/include:
        miscadmin.h (r1.160 -> r1.161)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/miscadmin.h.diff?r1=1.160&r2=1.161)
        pgstat.h (r1.21 -> r1.22)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/pgstat.h.diff?r1=1.21&r2=1.22)
    pgsql-server/src/include/storage:
        lock.h (r1.76 -> r1.77)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/storage/lock.h.diff?r1=1.76&r2=1.77)
    pgsql-server/src/include/utils:
        guc.h (r1.46 -> r1.47)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/guc.h.diff?r1=1.46&r2=1.47)