Re: Postgres service stops when I kill client backend on Windows - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Postgres service stops when I kill client backend on Windows
Date
Msg-id 561A7315.1050209@dunslane.net
Whole thread Raw
In response to Re: Postgres service stops when I kill client backend on Windows  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Postgres service stops when I kill client backend on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Postgres service stops when I kill client backend on Windows  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers

On 10/11/2015 05:58 AM, Magnus Hagander wrote:
>
>
> On Sun, Oct 11, 2015 at 5:55 AM, Michael Paquier 
> <michael.paquier@gmail.com <mailto:michael.paquier@gmail.com>> wrote:
>
>     On Sun, Oct 11, 2015 at 8:54 AM, Ali Akbar <the.apaan@gmail.com
>     <mailto:the.apaan@gmail.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:
   andrew=# select pg_backend_pid();     pg_backend_pid   ----------------              24359   (1 row)
   andrew=# \! kill -9 24359   andrew=# select 1;   server closed the connection unexpectedly        This probably
meansthe server terminated abnormally        before or while processing the request.   The connection to the server was
lost.Attempting reset: Succeeded.   andrew=#
 


Amit's proposals elsewhere to increase the shmem timeout and increase 
logging seem reasonable.

cheers

andrew





pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Release of CVEs
Next
From: Tom Lane
Date:
Subject: Re: Postgres service stops when I kill client backend on Windows