Re: Postgres service stops when I kill client backend on Windows

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Ali Akbar <the(dot)apaan(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Dmitry Vasilyev <d(dot)vasilyev(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgres service stops when I kill client backend on Windows
Date: 2015-10-11 15:29:52
Message-ID: CABUevEy-UN=s36OnPT3o162Sr53jT+vVy6G=tvfv0jVNYOAW6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Oct 11, 2015 at 4:32 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:

>
>
> On 10/11/2015 05:58 AM, Magnus Hagander wrote:
>
>>
>>
>> On Sun, Oct 11, 2015 at 5:55 AM, Michael Paquier <
>> michael(dot)paquier(at)gmail(dot)com <mailto:michael(dot)paquier(at)gmail(dot)com>> wrote:
>>
>> On Sun, Oct 11, 2015 at 8:54 AM, Ali Akbar <the(dot)apaan(at)gmail(dot)com
>> <mailto:the(dot)apaan(at)gmail(dot)com>> wrote:
>> > C:\Windows\system32>taskkill /F /PID 2080
>> > SUCCESS: The process with PID 2080 has been terminated.
>>
>> taskkill /f *forcefully* terminates the process targeted [1]. Isn't
>> that equivalent to a kill -9? If you headshot a backend process on
>> Linux with kill -9, an instance won't restart either.
>> [1]:
>>
>> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/taskkill.mspx?mfr=true
>>
>>
>>
>> It does. If you want a "gracefull kill" on Windows, you must use "pg_ctl
>> kill" which can send an "emulated term-signal".
>>
>>
>>
> Nevertheless, we'd like a hard crash of a backend other than the
> postmaster not to have worse effects than on *nix, where killing a backend
> even with SIGKILL doesn't halt the server:
>

Oh, absolutely. I was just pointing out that something like taskill
*should* result in a hard restart of *all* backends, and if you want to
kill off just the one you should never use it, you should instead use
pg_ctl kill. But of course, none of those two should lead to the scenario
explained here where it does not come back up again.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2015-10-11 15:37:59 Re: Postgres service stops when I kill client backend on Windows
Previous Message Tom Lane 2015-10-11 15:22:55 Re: Postgres service stops when I kill client backend on Windows