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

From Andres Freund
Subject Re: Postgres service stops when I kill client backend on Windows
Date
Msg-id 20151012102537.GR30738@alap3.anarazel.de
Whole thread Raw
In response to Re: Postgres service stops when I kill client backend on Windows  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Postgres service stops when I kill client backend on Windows
List pgsql-hackers
On 2015-10-12 11:25:35 +0530, Amit Kapila wrote:
>      /*
> +     * Close the shared memory handle as the syslogger doesn't need to
> +     * attach to it.  For EXEC_BACKEND case, the shared memory handle
> +     * is inherited by all postmaster child processes irrespective of
> +     * whether they need it or not.
> +     */
> +#ifdef EXEC_BACKEND
> +    if (!CloseHandle(UsedShmemSegID))
> +        elog(LOG, "could not close handle to shared memory: error code %lu", GetLastError());
> +#endif
> +

It feels wrong to do this in syslogger.c - I mean it's not the only
process that's not attached to shared memory. Sure, the others get
killed, but nonetheless...

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Postgres service stops when I kill client backend on Windows
Next
From: Magnus Hagander
Date:
Subject: Re: Postgres service stops when I kill client backend on Windows