Re: binary patch problems

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Mikko Tiihonen <mikko(dot)tiihonen(at)nitorcreations(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: binary patch problems
Date: 2011-09-16 13:40:28
Message-ID: CADK3HH+z0-5VEHiT-bWQ2VdfbC=ZqYm2HBCEws6PZ3BPGFJCbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Interestingly enough I only get that particular problem when I run it
directly after an ant clean, if I run subsequent tests then I get
result set is already closed errors.

I applied v13 patch successfully. Is there a necessity to use the
patches you have just sent ?

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On Fri, Sep 16, 2011 at 8:20 AM, Mikko Tiihonen
<mikko(dot)tiihonen(at)nitorcreations(dot)com> wrote:
> 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
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2011-09-16 23:14:09 Re: binary patch problems
Previous Message Mikko Tiihonen 2011-09-16 13:20:08 Re: binary patch problems