[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-0007RM-PI@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
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/b98e5513f33154ede701963ee9115ea056e9dea9

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.