Re: [HACKERS] Re: [ADMIN] When postgres will be faster?

From: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Cc: sk(dot)list(at)comset(dot)net, pgsql-hackers(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org, Marcin Mazurek - Multinet SA - Poznan <m(dot)mazurek(at)multinet(dot)pl>
Subject: Re: [HACKERS] Re: [ADMIN] When postgres will be faster?
Date: 1999-11-30 16:44:46
Message-ID: 3843FEFE.3A856593@wgcr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oleg Bartunov wrote:
> I suggest postgres experts comment this topic. We really need to work
> with different databases using one connection. Postgres is rather good
> scalable DB engine and IMO it's worth to have such feature like
> DB pooling. Once postgres support db pooling it would be possible

The AOLserver webserver/application server already fully supports pooled
database connections to PostgreSQL.

AOLserver is fully multithreaded, and allows a configurable number of
database connections to be persistently pooled. There can be multiple
pools available, each connecting to a single database. AOLserver
dynamically manages the pools, with maximum number of pools and pool
persistence timeout configurable.

This allows many thousands of http connections to share a limited number
of database connections, thanks to AOLserver's multithreaded front end.

AOLserver will happily coexist with apache, just by binding to another
port.

The performance increase is on the order of 100 times faster than plain
CGI using the perl Pg module.

AOLserver features tight database integration through a tcl and C API.
The tcl API has specialized database connection commands, http
connection commands, thread creation-mutex-destruction-etc commands, and
many other highly useful (for web scripts) commands that make even tcl a
good web scripting language. www.aolserver.com, or
aolserver.lcs.mit.edu.

While it might be tempting to lift code out of AOLserver to do pooling,
AOLserver is under the dual APL/GPL license -- such code could be GPL'd,
but not BSD'd. But, AOLserver's source does give you an example of how
such pooling can be accomplished from a client-side libpq-using program.

The only problem is the issue of libpq's thread-safety or lack thereof
(in practice, the thread-safety issue doesn't show until you hit a high
load).

Ask Vince about AOLserver :-).

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 1999-11-30 16:49:27 Re: Portability (was Re: [HACKERS] Development installation fails)
Previous Message Peter Eisentraut 1999-11-30 16:44:39 Re: Portability (was Re: [HACKERS] Development installation fails)