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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers