From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <josh(at)agliodbs(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Function to kill backend |
Date: | 2004-04-06 15:32:41 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE17163D@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Tom Lane wrote:
> > "Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> > >> If we are going to allow session kill then of course we need
> > >> PID for that.
> >
> > > I still say we need this.
> >
> > Well, that seems to be the consensus, so I won't stand in the way.
> >
> > If you like the cancel-by-XID idea then I'd suggest providing two
> > functions: pg_cancel_query(XID) to send SIGINT and
> > pg_kill_session(PID) to send SIGTERM. I'm not sure if the
> other two
> > combinations (SIGINT by PID and SIGTERM by XID) are worth providing.
>
> Agreed. Two functions, cancel by xid (skips cancel if xid
> changes during command), and kill by pid for remote admin
> apps, is great.
This sounds good to me, too. (Though I think SIGINT by PID might be
good, I see no need for SIGTERM by XID).
But are you saying it *is* safe with SIGTERM to a backend? I always
thought it was before, but after what you said earlier in this thread, I
changed my mind... (Unfort, I'm not well enough into the deep ends of
the code to say which is right...)
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-04-06 15:36:21 | Re: Function to kill backend |
Previous Message | Andrew Dunstan | 2004-04-06 15:21:54 | Re: [HACKERS] logging statement levels |