Re: JDBC Large ResultSet problem + BadTimeStamp Patch - Mailing list pgsql-interfaces

From Steve Wampler
Subject Re: JDBC Large ResultSet problem + BadTimeStamp Patch
Date
Msg-id 39E4B11C.204A69A3@noao.edu
Whole thread Raw
In response to Re: JDBC Large ResultSet problem + BadTimeStamp Patch  (Peter Mount <peter@retep.org.uk>)
Responses Re: JDBC Large ResultSet problem + BadTimeStamp Patch
List pgsql-interfaces
Peter Mount wrote:
...
> Yes, there is a problem with multiple statements and transactions on the
> same connection when it comes to thread safety.
> 
> The problem as I see it is two fold.
> 
> 1: How to deal with two statements within one transaction. Related to this
> is the metadata methods that issue queries, how to deal with them while
> within a transaction.
> 
> 2: Currently the JDBC Specs only have transactions supported at the
> Connection level, so I can't see how they thought that Statements could
> possibly run within their own transactions, unless they thought that a
> workaround of this is the use of batches.

Ah, that probably explains why I've seen "tuple arrived before metadata"
messages when I've got several apps talking through CORBA to a java app
that connects to postgres.  Do I need to synchronize both inserts and
queries at the java app level to prevent this?  (I was hoping that
the BEGIN/END block in a transaction would be sufficient, but this makes
it sound as though it isn't.)

--
Steve Wampler-  SOLIS Project, National Solar Observatory
swampler@noao.edu


pgsql-interfaces by date:

Previous
From: davidw@linuxcare.com (David N. Welton)
Date:
Subject: Re: TCL API
Next
From: Joseph Shraibman
Date:
Subject: Re: JDBC Large ResultSet problem + BadTimeStamp Patch