Re: Cancelling idle in transaction state

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Cc: "Hannu Krosing" <hannu(at)2ndquadrant(dot)com>, "Kris Jurka" <books(at)ejurka(dot)com>,"James Pye" <lists(at)jwp(dot)name>, "Joachim Wieland" <joe(at)mcknight(dot)de>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Cancelling idle in transaction state
Date: 2009-12-30 14:54:47
Message-ID: 4B3B1557020000250002DA75@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Craig Ringer <craig(at)postnewspapers(dot)com(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-12-30 14:56:29 Re: test/example does not support win32.
Previous Message Teodor Sigaev 2009-12-30 14:51:09 Re: point_ops for GiST