Re: windows doesn't notice backend death

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: windows doesn't notice backend death
Дата
Msg-id 28338.1241374442@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: windows doesn't notice backend death  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: windows doesn't notice backend death  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: windows doesn't notice backend death  (justin <justin@emproshunts.com>)
Re: windows doesn't notice backend death  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Well, I can tell you that it is getting an exit code of 1, which is why 
> the postmaster isn't restarting.

Blech.  Count on Windows to find a way to break things.

> That raises two questions in my mind. First, is that the behaviour we 
> expect when we kill the backend this way? And second, why is it still 
> showing up in the output of pg_stat_activity?

Well, if the process is being hard-killed without an opportunity to run
through proc_exit(), then yes it is going to still show up in
pg_stat_activity.  It's pgstat_beshutdown_hook that removes that entry.

The problem here is that we need to be able to distinguish a task
manager kill from a voluntary exit(1).  Have M$ really been stupid
enough to make an external kill look just like an exit() call?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: windows doesn't notice backend death
Следующее
От: Tom Lane
Дата:
Сообщение: Re: windows doesn't notice backend death