> >>- There was a pg_kill_backend function in pre-8.0, but it
> was dropped
> >>because "it's too dangerous". Incidentially, I've been in
> the situation
> >>more than once where I needed to kill a backend process
> that was running
> >>wild; alternatively, I'd have to shutdown the whole server.
> I had to do
> >>this on the linux console with kill -9 (fortunately I did
> have access),
> >>or using the win32 task manager (same). This appears even more error
> >>prone to me than to point to the malicious process and kill
> it (through
> >>pgadmin/pg_kill_backend)
> >
> >
> > Certainly. But this was dropped because Tom couldn't get
> the bugs out (as I
> > recall) and make it "safe" to use, even for the superuser.
>
> Hm, don't remember that, AFAIR it was removed after a
> discussion between
> Tom and Dave that kill -9 would stress a code path that still isn't
> elaborated too much. But in the situations mentioned above, I
> took the
> risk and would like a function for that.
Not kill -9. Kill -9 is "safe" because it causes a complete restart of
the postmaster (it's the same as a backend crash, really). Kill -INT is
also safe, because it does a simlpe query cancel.
kill -TERM is the unsafe one. It is also the one most people use.
//Magnus