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

Re: JDBC gripe list

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pg(at)fastcrypt(dot)com>,<pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC gripe list
Date: 2011-03-27 16:55:58
Message-ID: 4D8F25CE020000250003BCCA@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-jdbc
> Dave Cramer  wrote:
>  
> Adding to the list is statement timeout. I seem to recall the issue
> is we do not want to spawn a thread for each statement which seems
> to be the only way to do this. Alternatively we could use timers,
> but I presume they just spawn threads as well.
 
No, see the java.util.Timer docs:
 
http://download.oracle.com/javase/6/docs/api/java/util/Timer.html
 
Each Timer object uses one thread and can handle thousands of pending
timers.  If you're using JDBC you're on a JVM, and those all know how
to multi-thread gracefully.  A daemon thread for a group of timers
should be no big deal.
 
We had a patch submitted for this, which looked to me like it was
pretty close to committable.  I raised some concerns and was
intending to look at it again, but haven't gotten the requisite round
tuits yet.
 
-Kevin

Responses

pgsql-jdbc by date

Next:From: Dave CramerDate: 2011-03-27 17:54:18
Subject: Re: idea to have driver return immediately after a query
Previous:From: Kevin GrittnerDate: 2011-03-27 16:46:08
Subject: Re: idea to have driver return immediately after a query

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