Re: Patch for select and APC on win32

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Patch for select and APC on win32
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE34B5A5@algol.sollentuna.se
обсуждение исходный текст
Ответ на Patch for select and APC on win32  ("Magnus Hagander" <mha@sollentuna.net>)
Список pgsql-patches
> > Here's a patch implementing the "thread method" to
> workaround the bug
> > with socket calls in signal handlers. See details in mail to
> > pgsql-hackers-win32 a couple of minutes ago.
>
> Looks ok, but wouldn't it be better placed in pgstat.c?

Actually, I don't think so. I considered it, and chose to put it in
postmaster.c for the following reason:

The functon pgstat_beterm itself is *not* the problem. In theory, it can
be called from places that are not signal handlers (sure, it's not done
today I think, but internal-API-wise, it could). That goes against
putting the fix ther.

Also, by putting the code inside the actual signal handler function, we
put the fix close to the problem, which makes it more visible in the
"trouble area". The problem is, IMHO, in the signal handler, and not in
the actual pgstat function.

I'll be happy to change this if you still think it's better, but I
figured I shuold put out my argument for doing what I did first :-)

//Magnus

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

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Initial eventlog support on win32
Следующее
От: Karel Zak
Дата:
Сообщение: Re: pstrndup()