Re: windows shared memory error

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: windows shared memory error
Дата
Msg-id 49FC5F3C.7000203@dunslane.net
обсуждение исходный текст
Ответ на Re: windows shared memory error  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: windows shared memory error  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: windows shared memory error  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers

Tom Lane wrote:
>
> Now this would only explain problems if there were some code path
> through the postmaster that could leave the errno set to
> ERROR_ALREADY_EXISTS (a/k/a EEXIST) when this code is reached.  I'm not
> sure there is one, and I have even less of a theory as to why system
> load might make it more probable to happen.  Still, this looks like a
> bug from here, and repeating the create call won't fix it.
>
>             
>   

Oh, I think that this code has such a path. We already know that the 
code I showed is entered when that error is set. So the solution would 
be to put SetError(0) before the call to CreateFileMapping(), possibly 
before both such calls.

Maybe we need to look at all the places we call GetLastError(). There 
are quite a few of them.

Good catch, BTW.

cheers

andrew


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

Предыдущее
От: Tobias Zahn
Дата:
Сообщение: Re: GEQO: ERX
Следующее
От: Tom Lane
Дата:
Сообщение: Re: windows shared memory error