On Sat, Oct 30, 2010 at 4:49 AM, Andres Freund <and...@anarazel.de> wrote: >> > Here is a proposed patch which enables cancellation of $subject.
Disclaimer: This isn't my area of expertise, so take the below with a grain or seven of salt. It sort of looks to me like the LOG_NO_CLIENT error flag and the silent_error_while_idle flag are trying to cooperate to get the effect of throwing an error without actually throwing an error. I'm wondering if it would be at all sensible to do that more directly by making ProcessInterrupts() call AbortCurrentTransaction() in this case. Assuming that works at all, it would presumably mean that the client would thereafter get something like this: current transaction is aborted, commands ignored until end of transaction block ...which might be thought unhelpful. But that could be fixed either by modifying errdetail_abort() or perhaps even by abstracting the "current transaction is aborted, commands..." message into a function that could produce an entirely different message if on either the first or all calls within a given transaction. I'm not sure if this would work, or if it's better. I'm just throwing it out there, because the current approach looks a little grotty to me. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers