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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dmitry Vasilyev <d(dot)vasilyev(at)postgrespro(dot)ru>
Cc: "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-09 23:43:11
Message-ID: CA+TgmoZWJUBR0x4KWsH1ZiqZT3iE_SfpnRB_kXKx9kG4Ca7zLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 9, 2015 at 5:52 AM, Dmitry Vasilyev
<d(dot)vasilyev(at)postgrespro(dot)ru> wrote:
> I’ve started PostgreSQL server on Windows and then I kill client
> backend’s process by taskkill the service was stopped:
>
> postgres=# select pg_backend_pid();
> pg_backend_pid
> ----------------
> 1976
>
> postgres=# \! taskkill /pid 1976 /f
> SUCCESS: The process with PID 1976 has been terminated.
> postgres=# select 1;
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> The connection to the server was lost. Attempting reset: Failed.
> !>
>
>
> If I kill backend’s process on Linux then service not failing. So
> what’s the problem? Why PostgreSQL is so strange on Windows?

Hmm. I'd expect that to cause a crash-and-restart cycle, just like a
SIGQUIT would cause a crash-and-restart cycle on Linux. But I would
expect the server to end up running again at the end, not stopped.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-10-09 23:49:58 Re: More work on SortSupport for text - strcoll() and strxfrm() caching
Previous Message Robert Haas 2015-10-09 23:41:44 Re: Hooking at standard_join_search (Was: Re: Foreign join pushdown vs EvalPlanQual)