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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Shave a few instructions from child-process startup sequence
Дата
Msg-id 30960.1383279615@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Shave a few instructions from child-process startup sequence  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Shave a few instructions from child-process startup sequence  (Robert Haas <robertmhaas@gmail.com>)
Re: Shave a few instructions from child-process startup sequence  (Gurjeet Singh <gurjeet@singh.im>)
Re: Shave a few instructions from child-process startup sequence  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
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?
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Shave a few instructions from child-process startup sequence
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Something fishy happening on frogmouth