Re: Helping application programmers catch threading bugs - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Helping application programmers catch threading bugs
Date
Msg-id Pine.BSO.4.64.0904132324360.16999@leary.csoft.net
Whole thread Raw
In response to Helping application programmers catch threading bugs  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-jdbc

On Mon, 13 Apr 2009, Kevin Grittner wrote:

> Based on this thread:
>
> http://archives.postgresql.org/pgsql-admin/2009-04/msg00100.php
>
> I was wondering whether it would make sense to add a checkThreading
> method to help programmers who make such mistakes catch them more
> easily.

The JDBC spec requires a Connection to be thread safe.  Ideally it should
be able to issue queries in parallel, but PG can't do that, so we block
instead.  There are subtle threading bugs in the JDBC driver, but they're
below the Connection level, for unusual things like executing a
PreparedStatement while issuing setXXX calls on the same object from
another thread.

Reading the thread didn't reveal an adequate description of the actual
problem, so it's not clear if there's anything to be done here or if it
was operator error.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Guy Rouillier
Date:
Subject: Re: Can't get JDBC to compile. Please help.
Next
From: John Lister
Date:
Subject: Query preparation