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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgres service stops when I kill client backend on Windows
Дата
Msg-id 1687.1444660847@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Postgres service stops when I kill client backend on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Postgres service stops when I kill client backend on Windows  (Amit Kapila <amit.kapila16@gmail.com>)
Re: Postgres service stops when I kill client backend on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> 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.

Actually, now that I look at it, it's even more obvious that this is the
wrong thing because *all the subprocess types in question already call
PGSharedMemoryDetach*.  That's necessary on Unix, but I should think that
on Windows all it will do is provoke the log message:
           elog(LOG, "could not unmap view of shared memory: error code %lu", GetLastError());

Could someone confirm whether syslogger, archiver, stats collector
processes reliably produce that log message at startup on Windows?
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgres service stops when I kill client backend on Windows
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Postgres service stops when I kill client backend on Windows