Re: windows doesn't notice backend death

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: windows doesn't notice backend death
Дата
Msg-id 49FD60F4.6080408@hagander.net
обсуждение исходный текст
Ответ на Re: windows doesn't notice backend death  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: windows doesn't notice backend death  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Andrew Dunstan wrote:
> 
> 
> Tom Lane wrote:
>> Andrew Dunstan <andrew@dunslane.net> writes:
>>  
>>> Tom Lane wrote:
>>>    
>>>> Ick.  Is it possible that the postmaster did get a report, but thought
>>>> it was normal session termination?  If so, how could we distinguish?
>>>>       
>>
>>  
>>> If that were the case then it would not have the dead process still
>>> listed as a live backend, ISTM, which it does.
>>>     
>>
>> The postmaster does not control the content of the pg_stat_activity
>> view.
>>
>>            
>>   
> 
> Well, I'm not I know how to find out the answer to your question. I
> could try attaching a debugger to the postmaster - if I knew where to
> put a breakpoint.

I'd start at pgwin32_deadchild_callback(). That's where the waiting
thread should activate once a child goes away.

That one should post a notice to the win32ChildQueue, which is polled in
win32_waitpid() - that's a second good point for a breakpoint.

This in turn should make things happen up in reaper() - as Alvaro
suggests, a third good place for a breakpoint.


FWIW, this certainly used to work. So we've either broken this recently,
or it's always been broken on Vista (I've never tried it myself on
Vista, only 2000, XP and 2003).

//Magnus


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: windows doesn't notice backend death
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: windows shared memory error