Skip site navigation (1) Skip section navigation (2)

Re: Problems with protocol V3 after migration to latest driver

From: "Alexey Yudichev" <Alexey(at)francoudi(dot)com>
To: "Kris Jurka" <books(at)ejurka(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Problems with protocol V3 after migration to latest driver
Date: 2004-10-25 07:36:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Thanks a lot for the fixes, will try new jars today, however, this planner problem will anyway prevent me from using V3. I was wrong, it DOES fix the performance problem if I force V2. So I just added protocolVersion=2 to all of my pool URLs for now, will wait for 8.0 server release to use V3 protocol.

Over the weekend I have discovered another problem which only appears when using new 8.0 JDBC drivers, regardless of protocol version. The bad thing is that it only appears on ONE of my absolutely identical server installations (same version on both - postgresql-server-7.4.5-1PGDG).

The problem is:

    Table "public.temp"
 Column | Type | Modifiers
 c      | oid  |

    Connection c = DriverManager.getConnection("jdbc:postgresql://host/db?compatible=7.1&user=xxx&password=yyy");
    PreparedStatement st = c.prepareStatement("INSERT INTO temp (c) values (?)");
    st.setBytes(1, "yahoo".getBytes("UTF-8")); //exception here

results in
java.sql.SQLException: ERROR: large object 36376616 does not exist
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(
	at org.postgresql.core.v3.QueryExecutorImpl.receiveFastpathResult(
	at org.postgresql.core.v3.QueryExecutorImpl.fastpathCall(
	at org.postgresql.fastpath.Fastpath.fastpath(
	at org.postgresql.fastpath.Fastpath.fastpath(
	at org.postgresql.fastpath.Fastpath.getInteger(
	at org.postgresql.largeobject.LargeObject.<init>(
	at org.postgresql.jdbc2.AbstractJdbc2Statement.setBytes(

I repeat, with 7.4 drivers it works OK and, surprisingly, it works OK even with newest drivers on one of two server installations I have.

-----Original Message-----
From: Kris Jurka [mailto:books(at)ejurka(dot)com]
Sent: Saturday, October 23, 2004 1:12 AM
To: Alexey Yudichev
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Problems with protocol V3 after migration to latest driver

> On Fri, 22 Oct 2004, Alexey Yudichev wrote:
> > I have recently tried to migrate to pgdev.307.jdbc3 driver and got
> > several problems.
> > 
> > [ setNull(i, Types.BOOLEAN) doesn't work]


> > [ setNull(i, Types.VARBINARY) doesn't work with compatibleVersion=7.1]


> > [ AT TIME ZONE INTERVAL ? doesn't work]

This looks like a server bug, I've reported it to the -bugs list.  It does 
appear that using " AT TIME ZONE (?::interval) " is a reasonable 

I've put up newly built jar files if you'd like to give them a test:

Kris Jurka


pgsql-jdbc by date

Next:From: Kris JurkaDate: 2004-10-25 08:06:42
Subject: Re: Problems with protocol V3 after migration to latest driver
Previous:From: Kris JurkaDate: 2004-10-25 04:57:59
Subject: Re: Translation update: pt_BR

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group