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

From Simon Riggs
Subject Re: Cancelling idle in transaction state
Date
Msg-id 1262199391.19367.6111.camel@ebony
Whole thread Raw
In response to Re: Cancelling idle in transaction state  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Wed, 2009-12-30 at 14:15 +0200, Heikki Linnakangas wrote:
> Simon Riggs wrote:
> > 
> > AFAIK, NOTICE was suggested because it can be sent at any time, whereas
> > ERRORs are only associated with statements.
> > 
> > http://developer.postgresql.org/pgdocs/postgres/protocol-flow.html#PROTOCOL-ASYNC
> > "It is possible for NoticeResponse messages to be generated due to
> > outside activity; for example, if the database administrator commands a
> > "fast" database shutdown, the backend will send a NoticeResponse
> > indicating this fact before closing the connection. Accordingly,
> > frontends should always be prepared to accept and display NoticeResponse
> > messages, even when the connection is nominally idle."
> 
> Could we send an asynchronous notification immediately when the
> transaction is cancelled, but also change the error message you get in
> the subsequent commands. Clients that ignore the async notification
> would still see a proper error message at the ERROR.
> 
> Something like:
> 
> ERROR:  current transaction was aborted because of conflict with
> recovery, commands ignored until end of transaction block
> 
> instead of the usual "current transaction is aborted, commands ignored
> until end of transaction block" message.

This is possible, yes.

I have an added complication, hinted at by Joachim, currently
investigating.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Thoughts on statistics for continuously advancing columns
Next
From: Andres Freund
Date:
Subject: Re: Hot Standy introduced problem with query cancel behavior