X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E00C33A40ED for ; Mon, 25 Oct 2004 08:36:21 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78960-01 for ; Mon, 25 Oct 2004 07:36:17 +0000 (GMT) Received: from hqex2k.francoudi.com (hqex2k.francoudi.com [217.27.32.8]) by svr1.postgresql.org (Postfix) with ESMTP id 2F51A3A40E4 for ; Mon, 25 Oct 2004 08:36:16 +0100 (BST) X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: Problems with protocol V3 after migration to latest driver Date: Mon, 25 Oct 2004 10:36:11 +0300 Message-ID: <8BCBF9DB739F034B87FE7C7D30EAE55C026AC203@hqex2k.francoudi.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [JDBC] Problems with protocol V3 after migration to latest driver Thread-Index: AcS4hCUz0niWRpOUS5es+IN8DlvYrwB3Z4Vg From: "Alexey Yudichev" To: "Kris Jurka" Cc: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/255 X-Sequence-Number: 11360 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=3D2 to a= ll of my pool URLs for now, will wait for 8.0 server release to use V3 prot= ocol. 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 i= s that it only appears on ONE of my absolutely identical server installatio= ns (same version on both - postgresql-server-7.4.5-1PGDG). The problem is: Table "public.temp" Column | Type | Modifiers --------+------+----------- c | oid | Class.forName("org.postgresql.Driver"); Connection c =3D DriverManager.getConnection("jdbc:postgresql://host/db= ?compatible=3D7.1&user=3Dxxx&password=3Dyyy"); c.setAutoCommit(false); PreparedStatement st =3D c.prepareStatement("INSERT INTO temp (c) value= s (?)"); st.setBytes(1, "yahoo".getBytes("UTF-8")); //exception here st.executeUpdate(); [...] results in java.sql.SQLException: ERROR: large object 36376616 does not exist at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExec= utorImpl.java:1187) at org.postgresql.core.v3.QueryExecutorImpl.receiveFastpathResult(QueryExe= cutorImpl.java:409) at org.postgresql.core.v3.QueryExecutorImpl.fastpathCall(QueryExecutorImpl= .java:345) at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:67) at org.postgresql.fastpath.Fastpath.fastpath(Fastpath.java:106) at org.postgresql.fastpath.Fastpath.getInteger(Fastpath.java:118) at org.postgresql.largeobject.LargeObject.(LargeObject.java:89) at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.j= ava:150) at org.postgresql.jdbc2.AbstractJdbc2Statement.setBytes(AbstractJdbc2State= ment.java:1011) [...] 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@ejurka.com] Sent: Saturday, October 23, 2004 1:12 AM To: Alexey Yudichev Cc: pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Problems with protocol V3 after migration to latest dri= ver > On Fri, 22 Oct 2004, Alexey Yudichev wrote: >=20 > > I have recently tried to migrate to pgdev.307.jdbc3 driver and got > > several problems. > >=20 > > [ setNull(i, Types.BOOLEAN) doesn't work] Fixed. > > [ setNull(i, Types.VARBINARY) doesn't work with compatibleVersion=3D7.1] Fixed. > > [ AT TIME ZONE INTERVAL ? doesn't work] This looks like a server bug, I've reported it to the -bugs list. It does= =20 appear that using " AT TIME ZONE (?::interval) " is a reasonable=20 workaround. I've put up newly built jar files if you'd like to give them a test: http://www.ejurka.com/pgsql/jars/alexey/ Kris Jurka