Re: Cancelling idle in transaction state - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Cancelling idle in transaction state
Date
Msg-id 603c8f070912051923u1840ffy76419410a5e348a1@mail.gmail.com
Whole thread Raw
In response to Re: Cancelling idle in transaction state  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Dec 5, 2009 at 10:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I think this line of thinking is on the right track.  The server
>> should certainly not send back an immediate ERROR response, because
>> that will definitely confuse the client.  Of course, any subsequent
>> commands will report ERRORs until the client rolls back.  But it also
>> seems highly desirable for the server to send some sort of immediate,
>> asynchronous notification, so that a sufficiently smart client can
>> immediately report the error back to the user or take such other
>> action as it deems appropriate.
>
> If you must have that, send a NOTICE.

Ah ha!  I missed that one.  That's perfect.

> I don't actually see the point
> though.  If the client was as smart and well-coded as all that, it
> wouldn't be sitting on an open transaction in the first place.

Think about an interactive client.  It's not the client's fault that
the user has chosen to begin a transaction and then sit there
cogitating, but the client would like to let the user know right away
that their current transaction is defunct.

...Robert


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cancelling idle in transaction state
Next
From: Simon Riggs
Date:
Subject: Re: Cancelling idle in transaction state