Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE92E77D@algol.sollentuna.se
обсуждение исходный текст
Ответы Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> Here is the full patch of the timer implemenation with threading safty
> added. Basic test is by several rounds of "make check"  and threading
> safty test is by a SQL file with many lines of "set
> statement_timeout =
> x". I don't know if there are any corner cases that I should
> consider, if
> any, let me know.

Here's another version of this patch ;-) I've based it on your patch, so
the changes to ovalue etc should sitill be there.

If we're going to create a separate thread, there is no need to deal
with APCs at all, I beleive. We can just use the existing timeout
functionality in WaitForSingleObjectEx(), which simplifies the code a
bit.

That is assuming we don't need sub-millisecond accuracy, because WFSO
only provides milliseconds (waitabletimer provides 1/10th of a
microsecond).

Tested with both serial and parallel regression tests and with a manual
set statement_timeout test, just as yours. And finally, also tested the
deadlock detection which I beleive also uses setitimer().

//Magnus

PS. Qingqing: it helps at least me if you can post your patch as an
attached file instead of inline. That makes absolutely sure my mailer
(yeah, I know...) doesn't get a chance to break the lines.

Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance