Re: windows doesn't notice backend death

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: windows doesn't notice backend death
Date: 2009-05-03 18:14:02
Message-ID: 28338.1241374442@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-05-03 19:04:27 Re: windows doesn't notice backend death
Previous Message Andrew Dunstan 2009-05-03 17:58:55 Re: windows doesn't notice backend death