Re: Pre-forking backend

Поиск
Список
Период
Сортировка
От Ken Hirsch
Тема Re: Pre-forking backend
Дата
Msg-id 00f601c1492a$9443a600$87863dd0@hppav
обсуждение исходный текст
Ответ на Re: Pre-forking backend  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
>
> This approach would only work as far as saving the fork() call itself,
> not the backend setup time.  Not sure it's worth the trouble.  I doubt
> that the fork itself is a huge component of our start time; it's setting
> up all the catalog caches and so forth that's expensive.

On Unix, yeah, but on Windows, VMS, MPE/iX, possibly others, forking is
expensive.  Even on Unix, you're not losing anything by this architecture.

The simple solution is to have wait on separate sockets and add a redirect
capability to the protocol.  The program would be:

If the clients wants the database I have open, great, we're in business
else if the client supports redirect, do redirect
else if I can pass file descriptor on this OS, pass file descriptor to the right process
else throw away what we've done and open the right database.

Simple!  It's just a small matter of programming.






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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Pre-forking backend
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Glitch in handling of postmaster -o options