Re: WITH HOLD and pooled connections

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WITH HOLD and pooled connections
Date: 2003-08-08 20:47:14
Message-ID: 3F340C52.9050603@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-08-08 20:53:33 Re: WITH HOLD and pooled connections
Previous Message Bruce Momjian 2003-08-08 20:41:19 Re: WITH HOLD and pooled connections