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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-jdbc by date

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