Re: kill -KILL: What happens?
| От | Tom Lane |
|---|---|
| Тема | Re: kill -KILL: What happens? |
| Дата | |
| Msg-id | 19942.1294941610@sss.pgh.pa.us обсуждение |
| Ответ на | Re: kill -KILL: What happens? (David Fetter <david@fetter.org>) |
| Ответы |
Re: kill -KILL: What happens?
Re: kill -KILL: What happens? |
| Список | pgsql-hackers |
David Fetter <david@fetter.org> writes:
> On Thu, Jan 13, 2011 at 10:41:28AM -0500, Tom Lane wrote:
>> It's just that you're then looking at having to manually clean up the
>> child processes and then restart the postmaster; a process that is not
>> only tedious but does offer the possibility of screwing yourself.
> Does this mean that there's no cross-platform way to ensure that
> killing a process results in its children's timely (i.e. before damage
> can occur) death? That such a way isn't practical from a performance
> point of view?
The simple, easy, cross-platform solution is this: don't kill -9 the
postmaster. Send it one of the provisioned shutdown signals and let it
kill its children for you.
At least on Unix I don't believe there is any other solution. You
could try looking at ps output but there's a fundamental race condition,
ie the postmaster could spawn another child just before you kill it,
whereupon the child is reassigned to init and there's no longer a good
way to tell that it came from that postmaster.
regards, tom lane
В списке pgsql-hackers по дате отправления: