Re: Prepared Statements vs. pgbouncer

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Prepared Statements vs. pgbouncer
Date: 2007-09-30 20:50:54
Message-ID: 47000C2E.8030409@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Josh Berkus wrote:
> Oliver,
>
>> S_1 from client 1 might be a completely different query to S_1 from
>> client 2. The JDBC driver just numbers statements sequentially as they
>> are used.
>
> So, how does j2EE-side connection pooling handle this?

Err.. it is dealing with JDBC connections, not protocol level stuff, so
there's no issue with statement naming. The driver just does what it
normally does (maintains a mapping of query to statement name on each
connection). The usual J2EE connection pool model is different to what
pgbouncer apparently does as clients explicitly return connections to
the pool when no longer needed -- which effectively invalidates any
PreparedStatement objects they might still be holding -- and reobtain
them when later need.

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2007-10-01 07:11:12 Re: ResultSet with more than 5 rows causes error
Previous Message Josh Berkus 2007-09-30 15:39:00 Re: Prepared Statements vs. pgbouncer