pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stefano B. <stefano.bonnin@comai.to>
To: pgsql-jdbc@postgresql.org
Subject: executeQuery hangs my application
Date: Tue, 13 Dec 2005 14:52:53 +0100
Message-ID: <005801c5ffec$83c779a0$0501a8c0@comai04> (raw)

Hi,

I have a problem with the PostgreSQL JDBC drivers 8.1+.

In my code I call the executeQuery method and sometimes it seems to lock my application.
I tried to update the driver to the newer 8.2 version but I obtained the same result ...

The database server version is 8.1 for Windows (but I am not the administrator)
I have found this problem (for now) only on this server ...

the jdbc log is the following:

*****************************************************
14:09:10.171 (2) PostgreSQL 8.2devel JDBC3 with SSL (build 500)
14:09:10.171 (2) Trying to establish a protocol version 3 connection to <_the_server_IP_>:5432
14:09:10.265 (2)  FE=> StartupPacket(user=postgres, database=barricalla, client_encoding=UNICODE, 

DateStyle=ISO)
14:09:10.390 (2)  <=BE AuthenticationReqMD5(salt=be98c8a8)
14:09:10.390 (2)  FE=> Password(md5digest=md5724bad3aac24aa6aed8dfebfe9eafcfa)
14:09:10.468 (2)  <=BE AuthenticationOk
14:09:10.468 (2)  <=BE ParameterStatus(client_encoding = UNICODE)
14:09:10.468 (2)  <=BE ParameterStatus(DateStyle = ISO, MDY)
14:09:10.468 (2)  <=BE ParameterStatus(integer_datetimes = off)
14:09:10.468 (2)  <=BE ParameterStatus(is_superuser = on)
14:09:10.468 (2)  <=BE ParameterStatus(server_encoding = UTF8)
14:09:10.468 (2)  <=BE ParameterStatus(server_version = 8.1.1)
14:09:10.468 (2)  <=BE ParameterStatus(session_authorization = postgres)
14:09:10.468 (2)  <=BE ParameterStatus(standard_conforming_strings = off)
14:09:10.468 (2)  <=BE ParameterStatus(TimeZone = CET)
14:09:10.468 (2)  <=BE BackendKeyData(pid=1664,ckey=1388535757)
14:09:10.468 (2)  <=BE ReadyForQuery(I)
14:09:10.468 (2)     compatible = 8.2
14:09:10.468 (2)     loglevel = 2
14:09:10.468 (2)     prepare threshold = 5
getConnection returning driver[className=org.postgresql.Driver,org.postgresql.Driver@15fc672]
14:09:10.468 (2) simple execute, 

handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@9770a3, maxRows=0, fetchSize=0, 

flags=17
14:09:10.468 (2)  FE=> Parse(stmt=null,query="SELECT max("fulldate"),min("fulldate") FROM "data_cab_a" 

",oids={})
14:09:10.484 (2)  FE=> Bind(stmt=null,portal=null)
14:09:10.484 (2)  FE=> Describe(portal=null)
14:09:10.484 (2)  FE=> Execute(portal=null,limit=0)
14:09:10.484 (2)  FE=> Sync
14:09:10.687 (2)  <=BE ParseComplete [null]
14:09:10.687 (2)  <=BE BindComplete [null]
14:09:10.687 (2)  <=BE RowDescription(2)
14:09:10.687 (2)  <=BE DataRow
14:09:10.687 (2)  <=BE CommandStatus(SELECT)
14:09:10.828 (2)  <=BE ReadyForQuery(I)
14:09:11.187 (2) simple execute, 

handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@4298e, maxRows=0, fetchSize=0, 

flags=17
14:09:11.187 (2)  FE=> Parse(stmt=null,query="SELECT * FROM "data_cab_a"  WHERE "fulldate" < timestamp 

'2005-11-11 00:00:00' AND  "fulldate" >= timestamp '2005-10-12 00:00:00'",oids={})
14:09:11.187 (2)  FE=> Bind(stmt=null,portal=null)
14:09:11.187 (2)  FE=> Describe(portal=null)
14:09:11.187 (2)  FE=> Execute(portal=null,limit=0)
14:09:11.187 (2)  FE=> Sync
14:09:11.578 (2)  <=BE ParseComplete [null]
14:09:11.578 (2)  <=BE BindComplete [null]
14:09:11.578 (2)  <=BE RowDescription(13)
14:09:11.578 (2)  <=BE DataRow
14:09:11.578 (2)  <=BE DataRow
14:09:11.578 (2)  <=BE DataRow
14:09:11.593 (2)  <=BE DataRow
14:09:11.593 (2)  <=BE DataRow
14:09:11.593 (2)  <=BE DataRow
14:09:11.593 (2)  <=BE DataRow
14:09:11.593 (2)  <=BE DataRow

...
...
... other ~5000 lines
...
...


14:10:06.109 (2)  <=BE CommandStatus(SELECT)
14:10:06.109 (2)  <=BE ReadyForQuery(I)

14:10:42.515 (2) simple execute, 

handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@11ed166, maxRows=0, 

fetchSize=0, flags=17
14:10:42.515 (2)  FE=> Parse(stmt=null,query="SELECT * FROM "data_cab_a"  WHERE "fulldate" < timestamp 

'2005-12-11 00:00:00' AND  "fulldate" >= timestamp '2005-11-11 00:00:00'",oids={})
14:10:42.515 (2)  FE=> Bind(stmt=null,portal=null)
14:10:42.515 (2)  FE=> Describe(portal=null)
14:10:42.515 (2)  FE=> Execute(portal=null,limit=0)
14:10:42.515 (2)  FE=> Sync
14:10:42.859 (2)  <=BE ParseComplete [null]
14:10:42.859 (2)  <=BE BindComplete [null]
14:10:42.859 (2)  <=BE RowDescription(13)
14:10:42.859 (2)  <=BE DataRow
14:10:42.859 (2)  <=BE DataRow
14:10:42.859 (2)  <=BE DataRow
14:10:42.859 (2)  <=BE DataRow

...
... other ~5000 lines
...

14:11:21.140 (2)  <=BE DataRow
14:11:21.140 (2)  <=BE DataRow
14:11:21.140 (2)  <=BE DataRow
14:11:21.140 (2)  <=BE DataRow
14:11:21.140 (2)  <=BE DataRow
14:11:21.140 (2)  <=BE DataRow
******************************************************************************

at this point no other log messages are printed and the application seems locked on the executeQuery method.
The database connection is opened (even if I wait for 2 or 3 hours ...)

Any hints?
Thanks in advance.

Stefano

Message-ID: <005801c5ffec$83c779a0$0501a8c0@comai04>
Permalink:  ../005801c5ffec$83c779a0$0501a8c0@comai04/
Also on:    postgresql.org/message-id/005801c5ffec$83c779a0$0501a8c0@comai04

 · 

reply

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: stefano.bonnin@comai.to
  Subject: Re: executeQuery hangs my application
  In-Reply-To: <005801c5ffec$83c779a0$0501a8c0@comai04>
  References: <005801c5ffec$83c779a0$0501a8c0@comai04>

* 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