Re: Problems with protocol V3 after migration to latest driver

Поиск
Список
Период
Сортировка
От Alexey Yudichev
Тема Re: Problems with protocol V3 after migration to latest driver
Дата
Msg-id 8BCBF9DB739F034B87FE7C7D30EAE55C026AC203@hqex2k.francoudi.com
обсуждение исходный текст
Ответ на Problems with protocol V3 after migration to latest driver  ("Alexey Yudichev" <Alexey@francoudi.com>)
Ответы Re: Problems with protocol V3 after migration to latest driver  (Kris Jurka <books@ejurka.com>)
Список 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
URLsfor 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
protocolversion. The bad thing is that it only appears on ONE of my absolutely identical server installations (same
versionon 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
installationsI 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Translation update: pt_BR
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Problems with protocol V3 after migration to latest driver