Re: fork/exec patch: pre-CreateProcess finalization

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fork/exec patch: pre-CreateProcess finalization
Дата
Msg-id 21143.1073628931@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: fork/exec patch: pre-CreateProcess finalization  (Claudio Natoli <claudio.natoli@memetrics.com>)
Список pgsql-patches
Claudio Natoli <claudio.natoli@memetrics.com> writes:
> Tom Lane wrote:
>> I think the simplest way to make this work is to use an array that's
>> 2*MaxBackend items long (corresponding to the max number of children the
>> postmaster will fork).

> Actually, now that I think about it, is even that big enough. There is a
> reason BackendList is a list. In pathological situations, the postmaster
> could be made to fork a much larger number than 2*MaxBackend simultaneous
> children, although only this many will be allowed to become backends.
> (I guess we could check the port->canAcceptConnections value, and not add
> the backend to the array when == CAC_TOOMANY).

Probably we could rearrange the logic to test for too-many-children
before we even do the fork.  It'd be a little uglier that way, but
not out of the question.

            regards, tom lane

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