Re: Server instrumentation for 8.1

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>, <josh(at)agliodbs(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Server instrumentation for 8.1
Date: 2005-05-12 08:55:22
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C748F@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> >>- 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2005-05-12 09:02:58 Re: Server instrumentation for 8.1
Previous Message Andreas Pflug 2005-05-12 08:47:06 Re: Server instrumentation for 8.1