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 561D0BC1.1060601@dunslane.net
Whole thread Raw
In response to Re: Postgres service stops when I kill client backend on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Postgres service stops when I kill client backend on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

On 10/12/2015 04:35 PM, Tom Lane wrote:
> I wrote:
>> This is kind of a mess :-(.  But it does look like what we want is
>> for SubPostmasterMain to do more than nothing when it chooses not to
>> reattach.  Probably that should include resetting UsedShmemSegAddr to
>> NULL, as well as closing the handle.
> After poking around a bit more, I propose the attached patch.  I've
> checked that this is happy with an EXEC_BACKEND Unix build, but I'm not
> able to test it on Windows ... would somebody do that?
>
> BTW, it appears from this that Cygwin builds have been broken right along
> in a different way: according to the code in sysv_shmem's
> PGSharedMemoryReAttach, Cygwin does cause a re-attach to occur, which we
> were not undoing for putatively-not-connected-to-shmem child processes.
> That's a robustness problem because it breaks the postmaster's expectation
> that it's safe to not reinitialize shmem after a crash of one of those
> processes.  I believe this patch fixes that problem as well, though if
> anyone can test it on Cygwin that wouldn't be a bad thing either.
>
>             


OK, I can test it. But it's not quite clear to me from your description 
how I should test Cygwin.


cheers

andrew





pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.
Next
From: Tom Lane
Date:
Subject: Re: Postgres service stops when I kill client backend on Windows