pgsql: Commonalize process startup code. - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: Commonalize process startup code.
Date
Msg-id E1YBBBR-00021n-FU@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Commonalize process startup code.

Move common code, that was duplicated in every postmaster child/every
standalone process, into two functions in miscinit.c.  Not only does
that already result in a fair amount of net code reduction but it also
makes it much easier to remove more duplication in the future. The
prime motivation wasn't code deduplication though, but easier addition
of new common code.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/31c453165b5a656044ce1dbce89f5828c1c7e23c

Modified Files
--------------
src/backend/bootstrap/bootstrap.c     |   26 ++-----------
src/backend/postmaster/autovacuum.c   |   49 ++----------------------
src/backend/postmaster/bgworker.c     |   18 ---------
src/backend/postmaster/bgwriter.c     |   12 ------
src/backend/postmaster/checkpointer.c |   11 ------
src/backend/postmaster/pgarch.c       |   20 +---------
src/backend/postmaster/pgstat.c       |   22 +----------
src/backend/postmaster/postmaster.c   |   60 +++++-------------------------
src/backend/postmaster/startup.c      |    9 -----
src/backend/postmaster/syslogger.c    |   22 ++---------
src/backend/postmaster/walwriter.c    |   13 -------
src/backend/replication/walreceiver.c |   11 ------
src/backend/tcop/postgres.c           |   28 +-------------
src/backend/utils/init/miscinit.c     |   66 +++++++++++++++++++++++++++++++++
src/include/miscadmin.h               |    3 ++
15 files changed, 96 insertions(+), 274 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pgsql: Make path to pg_service.conf absolute in documentation
Next
From: Andres Freund
Date:
Subject: pgsql: Make logging_collector=on work with non-windows EXEC_BACKEND aga