Connection Time

From: Martin Jung <martin(dot)jung(at)gmx(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Connection Time
Date: 2004-01-06 17:19:48
Message-ID: 200401061819.48933.martin.jung@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

using postgres for a long time I noticed an incompatibility after an upgrade
to a newer version of java.
I wrote a small test class (test.java, see attachment) to try my local
database installation.
This is what I got using the latest jdk:
jung(at)daherrim:~/tmp/test> java -version
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
jung(at)daherrim:~/tmp/test> time java -cp .:/usr/share/pgsql/pg73b1jdbc3.jar
Test
Exception in thread "main" java.sql.SQLException: ERROR: Relation 'test'
already exists

at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:126)
at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:451)
at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:281)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)
at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:200)
at Test.main(Test.java:7)

real 3m9.731s
user 0m0.654s
sys 0m0.045s

This is what I get using an older jdk version:
jung(at)daherrim:~/tmp/test> java -version
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)
jung(at)daherrim:~/tmp/test> time java -cp .:/usr/share/pgsql/pg73b1jdbc3.jar
Test
Exception in thread "main" java.sql.SQLException: ERROR: Relation 'test'
already exists

at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:126)
at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:451)
at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:281)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:48)
at
org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:200)
at Test.main(Test.java:7)

real 0m0.522s
user 0m0.387s
sys 0m0.066s

The version of pgsql is:
jung(at)daherrim:~/tmp/test> psql --version
psql (PostgreSQL) 7.3.4

Operating system is SuSE Linux 9.0 on an i568 machine.
Is this a known problem? Can I solve this by using some upgrade? I would like
to continue using postgres, but I and my customers need the latest version of
java. The three minute delay in connecting is hardly tolerable.

Thank you for your answer.

Sincereley,
Martin Jung

--
Martin Jung
Bussardstrasse 44, 91088 Bubenreuth
Tel. : +49-9131-932166
Fax. : +49-9131-828699
PGP public key ID: 0x3F2D0402. http://www.keyserver.net

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message George Lessmann 2004-01-06 23:08:40 Re: odd jdbc driver synchronization issue
Previous Message Arne Stoelck 2004-01-06 13:19:24 Getting a single row from a ResultSet