Re: Pre-forking backend - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: Pre-forking backend
Date
Msg-id 200109300440.f8U4ens04815@saturn.jw.home
Whole thread Raw
In response to Re: Pre-forking backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Pre-forking backend
List 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.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: PL/pgSQL bug?
Next
From: "Ken Hirsch"
Date:
Subject: Re: Pre-forking backend