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 BD1D35280B for ; Thu, 16 Jun 2005 13:19:42 -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 90073-02 for ; Thu, 16 Jun 2005 16:19:33 +0000 (GMT) Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.91]) by svr1.postgresql.org (Postfix) with ESMTP id 9983552809 for ; Thu, 16 Jun 2005 13:19:31 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Thu, 16 Jun 2005 11:19:30 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.2 Date: Thu, 16 Jun 2005 11:19:20 -0500 From: "Kevin Grittner" To: Subject: org.postgresql.util.PSQLException: The column name x was not found in this ResultSet. Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__PartA5865B98.0__=" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.054 tagged_above=0 required=5 tests=AWL, HTML_30_40, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200506/87 X-Sequence-Number: 13049 --=__PartA5865B98.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I'm pretty sure this is a bug, and it seems most likely to be in the JDBC driver, but I'm not sure. As part of testing for a possible conversion to PostgreSQL, I ran our replication process against a converted copy of our largest database (about 200 GB). I ran in about 2 million database transactions, and I got two of these exceptions. There were multiple threads applying transactions, each with its own JDBC connection. An update is done by getting an updatable ResultSet with a SELECT * FROM TableName WHERE , using the ResultSet.updateObject(String, Object) method, based on a Map of new values, then invoking the ResultSet.updateRow method. The referenced column definitely exists in the table for which the SELECT * was run. The stack trace within the driver is pretty short: org.postgresql.util.PSQLException: The column name isQuestReturned was not found in this ResultSet. at org.postgresql.jdbc2.AbstractJdbc2ResultSet.findColumn(AbstractJdbc2ResultSet.java:2381) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(AbstractJdbc2ResultSet.java:1511) at . . . at java.lang.Thread.run(Thread.java:534) For something that occurs once per million database transactions, it's hard to create a simple test case. I'm hoping someone can spot a possible cause. Given the circumstances, it looks like some race condition between the multiple JDBC threads might be involved. The version of the JDBC driver I'm using is PostgreSQL 8.0 JDBC3 with SSL (build 311), except that on June 8th I incorporated the latest version of AbstractJdbc2ResultSet from the stable 8.0 branch, to pick up a fix I needed. -Kevin --=__PartA5865B98.0__= Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable =20
I'm pretty sure this is a bug, and it seems most likely to = be in the JDBC driver, but I'm not sure.
 
As part of testing for a possible conversion to PostgreSQL, I = ran our replication process against a converted copy of our largest = database (about 200 GB).  I ran in about 2 million database = transactions, and I got two of these exceptions.  There were = multiple threads applying transactions, each with its own JDBC = connection.  An update is done by getting an updatable ResultSet with = a SELECT * FROM "TableName" WHERE <primary key columns = match literals>, using the ResultSet.updateObject(String, = Object) method, based on a Map of new values, then invoking = the ResultSet.updateRow method.  The referenced column definitely = exists in the table for which the SELECT * was run.  The stack = trace within the driver is pretty short:
 
org.postgresql.util.PSQLException: The column name isQuestReturned = was not found in this ResultSet.
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.findColumn(Abstrac= tJdbc2ResultSet.java:2381)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateObject(Abstr= actJdbc2ResultSet.java:1511)
at <my code> . . .
at java.lang.Thread.run(Thread.java:534)
 
For something that occurs once per million database transactions,= it's hard to create a simple test case.  I'm hoping someone = can spot a possible cause.  Given the circumstances, it looks = like some race condition between the multiple JDBC threads might be = involved.
 
The version of the JDBC driver I'm using is PostgreSQL 8.0 JDBC3 = with SSL (build 311), except that on June 8th I incorporated = the latest version of AbstractJdbc2ResultSet from the stable 8.0 = branch, to pick up a fix I needed.
 
-Kevin
 
--=__PartA5865B98.0__=--