|
|||||||||||
|
Re: [JDBC] Implementing setQueryTimeout()
From: Gregory Stark <stark(at)enterprisedb.com>
Date: Mon Feb 18 2008 - 06:24:51 EST
> Tom Lane wrote: I think you have to tackle this as two problems. The usual case is going to be a long query which you want to cancel. Cancelling is normally quick and you can report an error with the query just as if the database had encountered some other error. The problem of a broken network connection or down server is another case. For most users without a failover server I think triggering an error in this case would actually do more harm than good. Even with a failover in my experience you really want a manual or out-of-band mechanism to trigger failover lest you get false positives or double-failures. > (2) there is no simple way to nondestructively interrupt a blocking I/O call Ouch. That's frightening. I'm not sure there's any reasonable way to implement a statement timeout without some way to interrupt the read it's blocking on. Unless there some kind of select(2) equivalent that can allow you to block only for a limited amount of time and then regain control? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not matchReceived on Mon Feb 18 06:26:46 2008 This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:44:39 EDT |
||||||||||
|
|||||||||||