httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Sussman <>
Subject Re: project plan
Date Sat, 13 Jul 1996 23:31:50 GMT
> Well, a bunch of the modules will have problems with threading.  The msql
> and Postgres95 authentication modules as well as mod_php.  I can make the
> PHP part of mod_php thread-safe, but we have no control over libmsql.a
> and libpq.a.  Neither of these are thread-safe.  Hopefully RST's thread
> code can be told to only allow one thread at a time into these libraries.
> If that can be specified, libmsql.a should not be a large problem.  The
> library can have multiple active query results, so separate threads can
> manipulate separate queries simultaneously.  The only restriction would
> be that only 1 thread can perform an actual query at a time.  Since the
> mSQL daemon itself can only process 1 query at a time anyway, this
> limitation just moves the "wait for access" logic out of libmsql.a and into
> Apache.  Performance-wise there should be no difference.
> -Rasmus

Actualy, I don't think the postgres95 libraries will have much of a
problem with this either.  The formal opening of a new database connection
spawns a new backend process to handle it.  There is no need to worry
about the serialization of requests from different connections (read
apache threads) since postgres95 handles that on its own. So as long as
the backends aren't sharing any kind of memory and the various requests
within apache keep to their own pools, there should be no corruption.

Its been a good while since I have had anything to do with multithreading
and I may be missing a few points here and there but if someone could
point me at a good reference that applies to the package RST is using,
I'll give the postgres libraries a once over and make sure.


View raw message