Re: kill -KILL: What happens? - Mailing list pgsql-hackers

From Aidan Van Dyk
Subject Re: kill -KILL: What happens?
Date
Msg-id AANLkTikWTrr_zRH_oH=h6fW2Kn6Y0dSraW5grJoyVirP@mail.gmail.com
Whole thread Raw
In response to Re: kill -KILL: What happens?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: kill -KILL: What happens?  (Florian Pflug <fgp@phlo.org>)
Re: kill -KILL: What happens?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Jan 13, 2011 at 2:53 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> I'm not convinced.  I was thinking that we could simply treat it like
> SIGQUIT, if it's available.  I doubt there's a real use case for
> continuing to run queries after the postmaster and all the background
> processes are dead.  Expedited death seems like much better behavior.
> Even checking PostmasterIsAlive() once per query would be reasonable,
> except that it'd add a system call to check for a condition that
> almost never holds, which I'm not eager to do.

If postmaster has a few fds to spare, what about having it open a pipe
to every child it spawns.  It never has to read/write to it, but
postmaster closing will signal the client's fd.  The client just has
to pop the fd into whatever nrmal poll/select event handlign it uses
to notice when the "parent's pipe" is closed.

A FIFO would allow postmaster to not need as many file handles, and
clients reading the fifo would notice when the writer (postmaster)
closes it.

a.

--
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: kill -KILL: What happens?
Next
From: Robert Haas
Date:
Subject: Re: kill -KILL: What happens?