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

From Tom Lane
Subject Re: Shave a few instructions from child-process startup sequence
Date
Msg-id 20224.1383542425@sss.pgh.pa.us
Whole thread Raw
In response to Re: Shave a few instructions from child-process startup sequence  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Shave a few instructions from child-process startup sequence  (Gurjeet Singh <gurjeet@singh.im>)
List pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes:
> On Fri, Nov 1, 2013 at 9:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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.

>    As I could see, it appears to me that code in ServerLoop and
> initMasks is already dependent on it, if any socket is closed out of
> order, it can break the logic in these API's. Do me and Gurjeet are
> missing some point here?

It's not hard to foresee that we might have to fix those assumptions
someday.  If we were buying a lot by adding a similar assumption here,
it might be worth doing even in the face of having to revert it later.
But we're not buying much.  A few instructions during postmaster shutdown
is entirely negligible.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Shave a few instructions from child-process startup sequence
Next
From: Heikki Linnakangas
Date:
Subject: Re: missing RelationCloseSmgr in FreeFakeRelcacheEntry?