Re: windows doesn't notice backend death - Mailing list pgsql-hackers

From Tom Lane
Subject Re: windows doesn't notice backend death
Date
Msg-id 28338.1241374442@sss.pgh.pa.us
Whole thread Raw
In response to Re: windows doesn't notice backend death  (Andrew Dunstan <andrew@dunslane.net>)
Responses 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>)
List 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 by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: windows doesn't notice backend death
Next
From: Tom Lane
Date:
Subject: Re: windows doesn't notice backend death