Fix WaitLatch(NULL) on Windows.
authorThomas Munro <tmunro@postgresql.org>
Wed, 25 Nov 2020 04:44:15 +0000 (17:44 +1300)
committerThomas Munro <tmunro@postgresql.org>
Wed, 25 Nov 2020 04:55:49 +0000 (17:55 +1300)
commita7e65dc88b6f088fc2fcf5a660d866de644b1300
tree6c5ab6e5b75d1becd9dd5c1f44d877446b6b921d
parent805b816305b62cb3e2670418ced8f7184a2d29c7
Fix WaitLatch(NULL) on Windows.

Further to commit 733fa9aa, on Windows when a latch is triggered but we
aren't currently waiting for it, we need to locate the latch's HANDLE
rather 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
src/backend/storage/ipc/latch.c