Re: Function to kill backend - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Function to kill backend
Date
Msg-id 745.1081280399@sss.pgh.pa.us
Whole thread Raw
In response to Re: Function to kill backend  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Function to kill backend
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> OK, you have a runaway report. You want to stop it.  Query cancel is
> only going to stop the current query, and once you do that the next
> query is fed in so there is no way to actually stop the report,
> especially if the report is not being run from the same machine as the
> server (you can't kill the report process).

> I don't think most apps reconnect on disconnect, except maybe pooled
> connections where you don't expect your state to be stable between
> connections.  Certainly most reports can't just reconnect and keep
> going.

You're hypothecating a report generator that can recover from failed
queries, but not a failed connection?  Seems a rather contrived case.
Stupid apps are most likely gonna curl up and die on any unexpected
error (which is what the query cancel would look like to them).  Smart
apps may try harder to recover than you think.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Function to kill backend
Next
From: Bruce Momjian
Date:
Subject: Re: Function to kill backend