Re: Pre-forking backend

Поиск
Список
Период
Сортировка
От mlw
Тема Re: Pre-forking backend
Дата
Msg-id 3BB617F1.BBA5BCFF@mohawksoft.com
обсуждение исходный текст
Ответ на Pre-forking backend  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian wrote:
> 
> How hard would it be to pre-fork an extra backend for the database a
> user just requested so if they next user asks for the same database, the
> backend would already be started?

The only problem I could see is the socket. The pre-forked() back-end would
have to do the accept() for the new connection, but you could always have a
forked process waiting to go in the accept() routine. When it accepts a new
socket, it sends a signal off to the parent back-end to fork() over (couldn't
resist) a new backend.

That way there would be no fork() over head for new connections.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Pre-forking backend
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Spinlock performance improvement proposal