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

From Tom Lane
Subject Re: Postgres service stops when I kill client backend on Windows
Date
Msg-id 1311.1444659699@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgres service stops when I kill client backend on Windows  (Andres Freund <andres@anarazel.de>)
Responses Re: Postgres service stops when I kill client backend on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> Right. But that doesn't mean it's right to call PGSharedMemoryDetach()
> without other changes as done in Michael's proposed patch? That'll do an
> UnmapViewOfFile() which'll fail because nothing i mapped, but still not
> close UsedShmemSegID?

Ah, right, I'd not noticed that he proposed changing
CloseHandle(UsedShmemSegID) to PGSharedMemoryDetach().  The latter is
clearly the wrong thing.

I'm not sure whether we should just put the CloseHandle call in
postmaster.c, or invent a function in win32_shmem.c to provide a
layer of abstraction.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Postgres service stops when I kill client backend on Windows
Next
From: Tom Lane
Date:
Subject: Re: Postgres service stops when I kill client backend on Windows