Re: Connection Pooling, a year later - Mailing list pgsql-hackers

From Don Baccus
Subject Re: Connection Pooling, a year later
Date
Msg-id 3C1FAE95.9070503@pacifier.com
Whole thread Raw
In response to Re: Connection Pooling, a year later  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Connection Pooling, a year later
List pgsql-hackers
Bruce Momjian wrote:


> Seems like a lot of work to keep track of transaction state in the
> client;  seems easier to just unconditionally issue the begin;rollback.


Well, in the Oracle and PG drivers for AOLserver it wasn't, but then 
again applications code in that environment doesn't call libpq directly 
but through an abstraction layer that works with all DBs (the layer 
does, the query strings obviously sometimes don't!).  The db primitives 
then call an RDBMS-specific driver, which can call thread-safe RDMBS 
client libraries directly or call an external driver (possibly the 
external ODBC driver) for RDBMS's without a thread-safe client library.

So we can track things easily.  Along with other things, for instance 
retrying queries in one backend after another backend has bombed out and 
given the nice little message saying "another backend has closed, please 
retry your query".  Luckily it was pretty easy to kill PG 6.5 so I could 
test and debug this feature...

I suspect that major applications that support multiple RDBMS's take a 
somewhat similar approach.  In the context of providing an abstract 
database API for one's client code, adding persistent connection pooling 
seems pretty minor.

-- 
Don Baccus
Portland, OR
http://donb.photo.net, http://birdnotes.net, http://openacs.org



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Concerns about this release
Next
From: Bruce Momjian
Date:
Subject: Re: Concerns about this release