From: Alexey Yudichev <Alexey@francoudi.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
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> (raw)
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 |
Class.forName("org.postgresql.Driver");
Connection c = DriverManager.getConnection("jdbc:postgresql://host/db?compatible=7.1&user=xxx&password=yyy");
c.setAutoCommit(false);
PreparedStatement st = c.prepareStatement("INSERT INTO temp (c) values (?)");
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(QueryExecutorImpl.java:1187)
at org.postgresql.core.v3.QueryExecutorImpl.receiveFastpathResult(QueryExecutorImpl.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.<init>(LargeObject.java:89)
at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:150)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setBytes(AbstractJdbc2Statement.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 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]
Fixed.
> > [ setNull(i, Types.VARBINARY) doesn't work with compatibleVersion=7.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
appear that using " AT TIME ZONE (?::interval) " is a reasonable
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: Alexey@francoudi.com, books@ejurka.com
Subject: Re: Problems with protocol V3 after migration to latest driver
In-Reply-To: <8BCBF9DB739F034B87FE7C7D30EAE55C026AC203@hqex2k.francoudi.com>
References: <8BCBF9DB739F034B87FE7C7D30EAE55C026AC203@hqex2k.francoudi.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox