Re: java.sql.SQLException: ERROR: canceling query due
Re: java.sql.SQLException: ERROR: canceling query due
От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
Thanks, Tom. "SHOW statement_timeout" from the JDBC connection returns zero. I'm curious whether "SET statement_timeout=n" sets this for a connection. If so, wouldn't it be a good thing to update the JDBC setQueryTimeout and getQueryTimeout methods to use these SET and SHOW statements? -Kevin >>> Tom Lane 08/18/05 5:50 PM >>> "Kevin Grittner" writes: > Thanks much for the clarification. The statement_timeout setting is > commented out, with a note that it defaults to zero and that this > means it is disabled. The fact that it's commented out doesn't mean that it's not been set from elsewhere, such as a per-user default, or even a prior state of the config file. It'd be more trustworthy to connect to the server as the same user your JDBC client runs as, and do "SHOW statement_timeout". regards, tom lane
Re: java.sql.SQLException: ERROR: canceling query due
От:
Kris Jurka <books@ejurka.com>
Дата:
On Fri, 19 Aug 2005, Kevin Grittner wrote: > I'm curious whether "SET statement_timeout=n" sets this for a > connection. If so, wouldn't it be a good thing to update the JDBC > setQueryTimeout and getQueryTimeout methods to use these SET and SHOW > statements? > Yes, it sets it per connection, but the problem is that the JDBC level needs it per Statement. So we'd have to set/reset it for each command. I was originally concerned about thread safety and transactions, but thinking about it some more now the monitor around QueryExecutorImpl should protect against that. Maybe this is easier than I thought. Kris Jurka