> Tom Lane wrote:
> > Bruce Momjian <[EMAIL PROTECTED]> 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
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to