Skip site navigation (1) Skip section navigation (2)

Re: Helping application programmers catch threading bugs

From: Kris Jurka <books(at)ejurka(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Helping application programmers catch threading bugs
Date: 2009-04-14 03:34:43
Message-ID: Pine.BSO.4.64.0904132324360.16999@leary.csoft.net (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-jdbc by date

Next:From: John ListerDate: 2009-04-14 15:08:42
Subject: Query preparation
Previous:From: Kevin GrittnerDate: 2009-04-13 18:03:50
Subject: Re: Helping application programmers catch threading bugs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group