Re: Shave a few instructions from child-process startup sequence - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Shave a few instructions from child-process startup sequence
Date
Msg-id CA+TgmobROHtgFzVbUqD+zUz7qjZauBtSENON=c4zuxU18PM9yA@mail.gmail.com
Whole thread Raw
In response to Re: Shave a few instructions from child-process startup sequence  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Nov 1, 2013 at 12:20 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Amit Kapila <amit.kapila16@gmail.com> writes:
>> On Thu, Oct 31, 2013 at 2:41 AM, Gurjeet Singh <gurjeet@singh.im> wrote:
>>> Just a small patch; hopefully useful.
>
>> This is valid saving as we are filling array ListenSocket[] in
>> StreamServerPort() serially, so during ClosePostmasterPorts() once if
>> it encountered PGINVALID_SOCKET, it is valid to break the loop.
>> Although savings are small considering this doesn't occur in any
>> performance path, still I think this is right thing to do in code.
>
>> It is better to register this patch in CF app list, unless someone
>> feels this is not right.
>
> I think this is adding fragility for absolutely no meaningful savings.
> The existing code does not depend on the assumption that the array
> is filled consecutively and no entries are closed early.  Why should
> we add such an assumption here?

+1.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Something fishy happening on frogmouth
Next
From: Ashutosh Bapat
Date:
Subject: Re: [BUGS] BUG #8542: Materialized View with another column_name does not work?