-----Original Message-----
From: Marc G. Fournier [mailto:scrappy@hub.org]
Sent: Tuesday, February 05, 2002 11:37 AM
To: Haroldo Stenger
Cc: Dann Corbit; Tom Lane; pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] Threaded PosgreSQL server
[snip]
> That's kinda what I was hoping ... is it something that could be
> seamlessly integrated to have minimal impact on the code itself ...
even
> if there was some way of having a 'thread.c' vs 'non-thread.c' that
could
> be link'd in, with wrapper functions?

> Tha again, has anyone looked at the apache project?  Apache2 has
several
> "process models" ... prefork being one (like ours), or a 'worker',
which
> is a prefork/threaded model where you can have n child processes, with
m
> 'threads' inside of each ... not sure if something like that coul be
> retrofit'd into what we have, but ... ?

It could be done, but it might be an effort.  As an example the ACE
project:
http://www.cs.wustl.edu/~schmidt/ACE.html
has a number of easily selected threading models.  It is also portable
to an
enormous number of platforms (including all flavors of UNIX).  However,
it
is C++ rather than C, and so that particular transition would probably
be
pretty traumatic if someone tried to use ACE as a toolset.  But at least
it
does demonstrate that such a thing is feasible.  As a "for instance" you
can
look at the Jaws web server (which is both open source and very much
faster
than the Apache server).  It can easily be built with many different
threading
models.


Tue, 5 Feb 2002 11:47:26 -0800
"Dann Corbit" <DCorbit@connx.com>
Re: Threaded PosgreSQL server