Re: Pre-forking backend
От | Bruce Momjian |
---|---|
Тема | Re: Pre-forking backend |
Дата | |
Msg-id | 200110121619.f9CGJq402778@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Pre-forking backend (Jan Wieck <JanWieck@Yahoo.com>) |
Список | pgsql-hackers |
> Tom Lane wrote: > > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > > How hard would it be to pre-fork an extra backend > > > > How are you going to pass the connection socket to an already-forked > > child process? AFAIK there's no remotely portable way ... > > One of the mechanisms I've seen was that the master process > just does the socket(), bind(), listen(), than forks off and > the children coordinate via a semaphore that at most one of > them executes a blocking accept(). I think it was in some > older apache release. > > But in contrast to apache, we currently do most of the > initialization after we authenticated the user and know what > database to connect to. I'm not sure how much of the backend > startup could be done before accepting the connection. I agree this may not be a big win on most platforms, but for platforms like Solaris and NT, it could be a big win. Added to TODO: * Do listen() in postmaster and accept() in pre-forked backend -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: