[COMMITTERS] pgsql: Fix corner-case bug in WaitEventSetWaitBlock on Windows.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема [COMMITTERS] pgsql: Fix corner-case bug in WaitEventSetWaitBlock on Windows.
Дата
Msg-id E1cJjXn-0007RL-PM@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix corner-case bug in WaitEventSetWaitBlock on Windows.

If we do not reset the FD_READ event, WaitForMultipleObjects won't
return it again again unless we've meanwhile read from the socket,
which is generally true but not guaranteed.  WaitEventSetWaitBlock
itself may fail to return the event to the caller if the latch is
also set, and even if we changed that, the caller isn't obliged to
handle all returned events at once.  On non-Windows systems, the
socket-read event is purely level-triggered, so this issue does
not exist.  To fix, make Windows reset the event when needed.

This bug was introduced by 98a64d0bd713cb89e61bef6432befc4b7b5da59e,
and causes hangs when trying to use the pldebugger extension.

Patch by Amit Kapial.  Reported and tested by Ashutosh Sharma, who
also provided some analysis.  Further analysis by Michael Paquier.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3b790d256f8489d0765c3389d6860f1c6b4a9b2d

Modified Files
--------------
src/backend/storage/ipc/latch.c | 27 +++++++++++++++++++++++++++
src/include/storage/latch.h     |  3 +++
2 files changed, 30 insertions(+)


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: [COMMITTERS] pgsql: Refactor merge path generation code.
Следующее
От: Robert Haas
Дата:
Сообщение: [COMMITTERS] pgsql: Refactor partition tuple routing code to reduce duplication.