Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4DE69B5DC0F for ; Fri, 16 Sep 2011 10:20:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 97174-01 for ; Fri, 16 Sep 2011 13:20:12 +0000 (UTC) X-Greylist: delayed 00:06:36.000304 by SQLgrey-1.8.0-rc2 Received: from auth-smtp.nebula.fi (auth-smtp.nebula.fi [217.30.180.105]) by mail.postgresql.org (Postfix) with ESMTP id 60C4CB5DBCE for ; Fri, 16 Sep 2011 10:20:10 -0300 (ADT) Received: from quadvadis.localdomain (gw.nitor.fi [83.145.228.24]) (authenticated bits=0) by auth-smtp.nebula.fi (8.13.4/8.13.4) with ESMTP id p8GDK7Jx008429 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 16 Sep 2011 16:20:07 +0300 Message-ID: <4E734D08.10205@nitorcreations.com> Date: Fri, 16 Sep 2011 16:20:08 +0300 From: Mikko Tiihonen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: binary patch problems References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201109/37 X-Sequence-Number: 22155 On 09/16/2011 01:10 AM, Dave Cramer wrote: > I have applied to the current code and the tests fail with ResultSet > already closed. I can't replicate this in eclipse, only in the command > line ant test. My guess is that somehow result sets are being shared > across tests. Anyone shed some light on this ? The patch I applied is > at http://wiki.postgresql.org/wiki/JDBC-BinaryTransfer version 13 > Dave Cramer I've been lately trying to figure out the same problem. In separate emails I just sent the refreshed set of patches broken into separate patches out for easier review. The trace shows that for some reason the C_5 portal is closed while still processing the results. (3) FE=> Execute(portal=C_5,limit=1) (3) FE=> Sync (3) <=BE DataRow(len=305) (3) <=BE PortalSuspended (3) <=BE ReadyForQuery(T) (3) FE=> Execute(portal=C_5,limit=1) (3) FE=> Sync (3) <=BE DataRow(len=305) (3) <=BE PortalSuspended (3) <=BE ReadyForQuery(T) (3) FE=> CloseStatement(S_2) (3) FE=> ClosePortal(C_5) (3) FE=> Execute(portal=C_5,limit=1) (3) FE=> Sync (3) <=BE CloseComplete (3) <=BE CloseComplete (3) <=BE ErrorMessage(ERROR: portal "C_5" does not exist Location: File: postgres.c, Routine: exec_execute_message, Line: 1844 Server SQLState: 34000) org.postgresql.util.PSQLException: ERROR: portal "C_5" does not exist Location: File: postgres.c, Routine: exec_execute_message, Line: 1844 Server SQLState: 34000 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2158) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1887) at org.postgresql.core.v3.QueryExecutorImpl.fetch(QueryExecutorImpl.java:2090) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.next(AbstractJdbc2ResultSet.java:1870) at org.postgresql.test.jdbc2.DatabaseEncodingTest.testEncoding(DatabaseEncodingTest.java:149) The C_5 portal is closed because it is in the openPortalCleanupQueue containing PhantomReferences. The trace shows that S_2 is also closed at the same time, which is correct because that statement is no longer in use. If I debugged it correctly it looks like the query statement is closed by finalizer during the test which in turn closes the relevant portals. If I add stmt.close() to the end of the test there are no failures as it keeps the GC from killing of the statement during the test. But why I only seem to get it when running with binary transfer patches I do not know. So there must be something in the patches that I cannot spot. -Mikko