pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Commonalize process startup code.
Date: Tue, 13 Jan 2015 23:47:37 +0000
Message-ID: <E1YBBBR-00021n-FU@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1YBBBR-00021n-FU@gemulon.postgresql.org>
Permalink:  ../E1YBBBR-00021n-FU@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1YBBBR-00021n-FU@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: Commonalize process startup code.
  In-Reply-To: <E1YBBBR-00021n-FU@gemulon.postgresql.org>
  References: <E1YBBBR-00021n-FU@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox