Обсуждение: force JDBC driver fetch / autocommit parameters?

Поиск
Список
Период
Сортировка

force JDBC driver fetch / autocommit parameters?

От
"S. Balch"
Дата:
Greetings,

I'm using the postgresql-9.1-901.jdbc4 driver in an application (that I don't control) that's not passing along my specified fetch and autocommit parameters.  Is there anyway I can force the driver to use my required parameters outside of the application?

Thanks,
Sean

Re: force JDBC driver fetch / autocommit parameters?

От
Dave Cramer
Дата:
Can you be more specific as to what you are looking for ? I presume
there is something between you and the connection so when you turn
autocommit on it doesn't work ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca




On Thu, Oct 20, 2011 at 4:34 PM, S. Balch <sbalch@gmail.com> wrote:
> Greetings,
> I'm using the postgresql-9.1-901.jdbc4 driver in an application (that I
> don't control) that's not passing along my specified fetch and autocommit
> parameters.  Is there anyway I can force the driver to use my required
> parameters outside of the application?
> Thanks,
> Sean

Re: force JDBC driver fetch / autocommit parameters?

От
"S. Balch"
Дата:
Dave,

We're just running the JVM out of memory with a large query result.  By turning off autocommit and setting a reasonable fetch size this problem goes away.  The application using this driver does have a way to set these, but it seems to be broken.

Thanks,
Sean


On Fri, Oct 21, 2011 at 9:51 AM, Dave Cramer <pg@fastcrypt.com> wrote:
Can you be more specific as to what you are looking for ? I presume
there is something between you and the connection so when you turn
autocommit on it doesn't work ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca




On Thu, Oct 20, 2011 at 4:34 PM, S. Balch <sbalch@gmail.com> wrote:
> Greetings,
> I'm using the postgresql-9.1-901.jdbc4 driver in an application (that I
> don't control) that's not passing along my specified fetch and autocommit
> parameters.  Is there anyway I can force the driver to use my required
> parameters outside of the application?
> Thanks,
> Sean


Re: force JDBC driver fetch / autocommit parameters?

От
Craig Ringer
Дата:
On 10/21/2011 10:38 PM, S. Balch wrote:
> Dave,
>
> We're just running the JVM out of memory with a large query result.  By
> turning off autocommit and setting a reasonable fetch size this problem
> goes away.  The application using this driver does have a way to set
> these, but it seems to be broken.

I don't think there's any support for forcing these params at the moment.

You could modify the JDBC driver to hard-code these parameters and just
use your hacked JDBC driver. That'd probably be a maintenance mess in
the long run, though. It'd be better to write a patch to add JDBC URL
parameter support for overriding them, start using a patched driver you
recompile yourself, and submit that to pgsql-jdbc@postgresql.org for
inclusion in future versions so you don't have to worry about keeping it
up to date.

--
Craig Ringer