From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: windows doesn't notice backend death |
Date: | 2009-05-04 09:11:03 |
Message-ID: | 49FEB127.2020605@hagander.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> I wrote:
>> The first idea that comes to mind is to have some sort of "dead man
>> switch" that flags an active backend and is reset by proc_exit() after
>> it's finished cleaning up everything else. If the postmaster sees
>> this flag still set after backend exit, then it treats the backend as
>> having crashed regardless of what the reported exit code is.
>
> Another thought that came to mind: we could set up an atexit hook that
> does all the work that proc_exit() currently does, and reduce
> proc_exit() itself to just an exit() call. psql already relies on
> having atexit (or on_exit) so this doesn't appear to add any new
> portability issues.
>
> This will probably not fix the Vista taskmanager issue, since I'll
> bet it's not running atexit hooks anyway. What it would do is improve
> the situation so that a "clueless" exit() call would be no worse than
> elog(FATAL), rather than triggering a DB-wide restart as the dead man
> switch would do.
This sounds like a good idea in general - because it will avoid having
to restart on unix.
It'd still have to be combined with the dead-man-switch idea to defend
completely. But it could be worthwhile doing anyway, for other platforms.
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2009-05-04 09:21:57 | Re: Why isn't stats_temp_directory automatically created? |
Previous Message | Magnus Hagander | 2009-05-04 09:03:27 | Re: windows doesn't notice backend death |