Re: Shave a few instructions from child-process startup sequence

From: Gurjeet Singh <gurjeet(at)singh(dot)im>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Shave a few instructions from child-process startup sequence
Date: 2013-11-23 04:06:35
Message-ID: CABwTF4Uc+MpK4Bf8RtCNN5wfKBWBWd5x2xr_iZw3SR_etMi9FA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 20, 2013 at 10:21 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> On 11/5/13, 2:47 AM, Gurjeet Singh wrote:
> > On Mon, Nov 4, 2013 at 12:20 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> > <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
> >
> > But we're not buying much. A few instructions during postmaster
> > shutdown
> > is entirely negligible.
> >
> >
> > The patch is for ClosePostmasterPorts(), which is called from every
> > child process startup sequence (as $subject also implies), not in
> > postmaster shutdown. I hope that adds some weight to the argument.
>
> If there is a concern about future maintenance, you could add assertions
> (in appropriate compile mode) that the rest of the array is indeed
> PGINVALID_SOCKET. I think that could be a win for both performance and
> maintainability.
>

Makes sense! Does the attached patch look like what you expected? I also
added a comment to explain the expectation.

Thanks and best regards,
--
Gurjeet Singh http://gurjeet.singh.im/

EDB Inc. www.EnterpriseDB.com <http://www.enterprisedb.com>

Attachment Content-Type Size
shave_a_few_instructions_in_child_startup.v2.patch text/x-diff 755 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-11-23 05:10:05 Re: Building on S390
Previous Message Kevin Grittner 2013-11-23 00:38:53 Re: [GENERAL] pg_upgrade ?deficiency