Re: Cancelling idle in transaction state
Kevin Grittner <kevin.grittner@wicourts.gov>
From: "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
To: "Simon Riggs" <simon@2ndquadrant.com>, "Craig Ringer" <craig@postnewspapers.com.au>
Cc: "Hannu Krosing" <hannu@2ndquadrant.com>, "Kris Jurka" <books@ejurka.com>,"James Pye" <lists@jwp.name>, "Joachim Wieland" <joe@mcknight.de>, "pgsql-hackers" <pgsql-hackers@postgresql.org>, "Tom Lane" <tgl@sss.pgh.pa.us>
Date: 2009-12-30T14:54:47Z
Lists: pgsql-hackers
Craig Ringer <craig@postnewspapers.com.au> wrote: > It might be kind of handy if I could getWarnings() on the > connection object without blocking so I could call it before I > executed a statement on the connection ... but that'd always > introduce a race between transaction cancellation/timeout and > statement execution, so code must always be prepared to handle > timeout/cancellation related failure anyway. +1 (I think) If I'm understanding this, it sounds to me like it would be most appropriate for the NOTICE to generate a warning at the connection level and for the next request to throw an exception in the format suggested by Heikki -- which I think is what Craig is suggesting. -Kevin