Re: [HACKERS] socket calls in signal handler (WAS: APC + socket r

Поиск
Список
Период
Сортировка
От Claudio Natoli
Тема Re: [HACKERS] socket calls in signal handler (WAS: APC + socket r
Дата
Msg-id A02DEC4D1073D611BAE8525405FCCE2B55F397@harris.memetrics.local
обсуждение исходный текст
Ответы Re: [HACKERS] socket calls in signal handler (WAS:  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers-win32
[reviving this at great personal risk on win32]

> Claudio Natoli wrote:
> > The specific (and possibly only? are their others?) issue is the call to
> > pgstat_beterm from reaper/CleanupProc, invoked by a SIGCHLD. Can this
call
> > be deferred to the main loop (ie. ServerLoop) and is there any merit in
> > doing so?
>
> Just canvassing for options. If we can get a win32 specific
> change that we trust, great! (I think it goes without saying
> that, throughout the work on this port, we've tried to avoid
> changing the existing code as much as possible). However, if
> we can not, I'd like to have other options, and am exploring
> this possibility.

How are we going to work around this issue?

ISTM we have four options:
(a) Finding out for sure whether or not socket calls within APCs mash the
state of the internal socket libs etc.  We (now) know that a socket call
within an APC will cause a currently blocked socket call to fail without
error, but is anything else hammered that we don't (yet) know about? If we
can determine that the answer is no, we have a simple work-around (ie.
setting a flag like APCcalled, and checking on return from select...)
(b) Another win32 work-around (like pushing the pgstat_send call out on a
separate thread, if allowed)
(c) Deferring the pgstat_beterm call
and, ah:
(d) Rewriting the win32 signal code

Ok. So we really have (at most) three options :-)

Is (c) out of the question?  And, regardless of the answer to this, does
anyone have a definitive answer to (a), or what might be allowed in (b)?

Cheers,
Claudio



---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

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

Предыдущее
От: Claudio Natoli
Дата:
Сообщение: Re: shutdown problems on win32
Следующее
От: Mohan
Дата:
Сообщение: Storage Architecture!