Re: Threaded PosgreSQL server - Mailing list pgsql-hackers

From nconway@klamath.dyndns.org (Neil Conway)
Subject Re: Threaded PosgreSQL server
Date
Msg-id 20020206193326.GB14564@klamath.dyndns.org
Whole thread Raw
In response to Re: Threaded PosgreSQL server  ("Marc G. Fournier" <scrappy@hub.org>)
List pgsql-hackers
On Tue, Feb 05, 2002 at 03:36:41PM -0400, Marc G. Fournier wrote:
> 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 ... ?

We could even use the nice Apache Portable Runtime, which is a
platform-independant layer over threading/networking/shm/etc (there's a
summary here: http://apr.apache.org/docs/apr/modules.html).
This might improve PostgreSQL on non-UNIX platforms, namely Win32.

However, I think using threads is only a good idea if it gets us a
substantial performance increase. From what I've seen, that isn't the
case; and even if the time to create a connection is a bottleneck, there
are other, more conservative ways of improving it (e.g. pre-forking,
persistent backends, and IIRC some work Tom Lane was doing to reduce
backend startup time).

And given the complexity and reduced reliability that threads bring, I
think the only advantage would be buzzword-compliance -- which isn't a
priority, personally.

Cheers,

Neil



pgsql-hackers by date:

Previous
From: Andrew McMillan
Date:
Subject: Re: Management tool support and scalibility
Next
From: mlw
Date:
Subject: Re: [GENERAL] PostgreSQL v7.2 Final Release