From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, 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>, 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-12 10:26:15 |
Message-ID: | CABUevEy7LrQVvEzbPeFKOfu9mzVB4CGbyAR-ckRQR3BaAYEngg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Oct 12, 2015 at 12:25 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> 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...
>
+1. It feels like we're setting our selves up for repeating this mistake at
some later time :)
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Emre Hasegeli | 2015-10-12 10:32:59 | Re: point_ops for GiST |
Previous Message | Andres Freund | 2015-10-12 10:25:37 | Re: Postgres service stops when I kill client backend on Windows |