Re: WITH HOLD and pooled connections - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: WITH HOLD and pooled connections
Date
Msg-id 3F340C52.9050603@dunslane.net
Whole thread Raw
In response to Re: WITH HOLD and pooled connections  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WITH HOLD and pooled connections
List pgsql-hackers
Tom Lane wrote:

>Bruce Momjian <pgman@candle.pha.pa.us> writes:
>  
>
>>Seems we have a problem with pooled connections and WITH HOLD cursors.
>>We have code to reset transaction state and variables via RESET ALL, but
>>how do we remove WITH HOLD cursors when we pass a connection to a new
>>client?
>>    
>>
>
>Prepared statements would be just as much of a problem.  I think the
>correct answer is simply "don't use those features in a pooled
>environment".
>
>            regards, tom lane
>

Ouch. Double ouch in fact. I'm using prepared statements extensively in 
my current (pooled conn) app. All pure selects.

Can this be narrowed down a bit? Is it a problem on all query types? On 
all versions? What if the statement object (in JDBC) is closed?

If it's really a problem I'll have to do some nasty last-minute recoding 
(again!) :-( (or abandon using pooling, which I would also hate).

andrew



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Moved simple_prompt()/sprompt.c
Next
From: Bruce Momjian
Date:
Subject: Re: WITH HOLD and pooled connections