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 069BF528DA for ; Wed, 17 Aug 2005 19:52:02 -0300 (ADT) 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 84840-03 for ; Wed, 17 Aug 2005 22:52:00 +0000 (GMT) Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.91]) by svr1.postgresql.org (Postfix) with ESMTP id C56B752802 for ; Wed, 17 Aug 2005 19:51:58 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Wed, 17 Aug 2005 17:52:01 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.4 Date: Wed, 17 Aug 2005 17:51:50 -0500 From: "Kevin Grittner" To: Subject: java.sql.SQLException: ERROR: canceling query due to user request Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 required=5 tests=[AWL=0.007] X-Spam-Level: X-Archive-Number: 200508/117 X-Sequence-Number: 13686 The server is 8.0.3 running on Windows. The client is using the 311 build = with some patches we need (from the stable branch). There is nothing we = know of which would be canceling things on the server side, and nothing we = know of which would be doing so on the JDBC client. (In fact, when this = happens during invocation of the Connection.commit method, I don't think = there is a way to cancel it programatically.) =20 A handful of these exceptions may be sprinkled throughout a stream of = thousands of queries in the course of a minute. There is nothing we've = been able to identify which differentiates the failing queries form those = which succeed. There is one clue, though -- except for the case where = they happen on Connection.commit, they all seem to happen during attempts = to update a row through a ResultSet shortly after an exception (such as a = duplicate key) was thrown, resulting in the rollback of the previous = database transaction. (That is, Connection.rollback was invoked after = catching the exception.) Connection.autoCommit is set to false. =20 Any suggestions regarding possible causes, possible workarounds, diagnostic= steps we should pursue, etc. are welcome. =20 Below are some typical stack traces, from the point where we invoke a JDBC = method. The executeUpdate method was invoked for an UPDATE statement. =20 java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(Quer= yExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecu= torImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl= .java:175) at org.postgresql.jdbc2.AbstractJdbc2Connection.executeTransactionCom= mand(AbstractJdbc2Connection.java:625) at org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2C= onnection.java:645) =20 java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(Quer= yExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecu= torImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl= .java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2S= tatement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstr= actJdbc2Statement.java:314) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJ= dbc2Statement.java:221) at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getPrimaryKeys(= AbstractJdbc2DatabaseMetaData.java:3130) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.isUpdateable(AbstractJ= dbc2ResultSet.java:1583) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkUpdateable(Abstra= ctJdbc2ResultSet.java:2444) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateValue(AbstractJd= bc2ResultSet.java:2682) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(AbstractJ= dbc2ResultSet.java:1149) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(AbstractJ= dbc2ResultSet.java:1511) =20 java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(Quer= yExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecu= torImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl= .java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2S= tatement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstr= actJdbc2Statement.java:330) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJ= dbc2Statement.java:240) at org.postgresql.core.Field.getColumnName(Field.java:247) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateValue(AbstractJd= bc2ResultSet.java:2693) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(AbstractJ= dbc2ResultSet.java:1149) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(AbstractJ= dbc2ResultSet.java:1511) =20 java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(Quer= yExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecu= torImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl= .java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2S= tatement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstr= actJdbc2Statement.java:330) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(Abstract= Jdbc2Statement.java:282) =20 java.sql.SQLException: ERROR: canceling query due to user request at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(Quer= yExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecu= torImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl= .java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2S= tatement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstr= actJdbc2Statement.java:330) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(Abstract= Jdbc2Statement.java:282) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateRow(AbstractJdbc= 2ResultSet.java:1307) =20