Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita7e65dc

Browse files
committed
Fix WaitLatch(NULL) on Windows.
Further to commit733fa9a, on Windows when a latch is triggered but wearen't currently waiting for it, we need to locate the latch's HANDLErather than calling ResetEvent(NULL).Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Reported-by: Ranier Vilela <ranier.vf@gmail.com>Discussion:https://postgr.es/m/CAEudQArTPi1YBc%2Bn1fo0Asy3QBFhVjp_QgyKG-8yksVn%2ByRTiw%40mail.gmail.com
1 parent805b816 commita7e65dc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/storage/ipc/latch.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,11 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
18351835

18361836
if (cur_event->events==WL_LATCH_SET)
18371837
{
1838-
if (!ResetEvent(set->latch->event))
1838+
/*
1839+
* We cannot use set->latch->event to reset the fired event if we
1840+
* aren't waiting on this latch now.
1841+
*/
1842+
if (!ResetEvent(set->handles[cur_event->pos+1]))
18391843
elog(ERROR,"ResetEvent failed: error code %lu",GetLastError());
18401844

18411845
if (set->latch&&set->latch->is_set)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp