pgsql: Teach WaitEventSetWait() to report multiple events on Windows.

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема pgsql: Teach WaitEventSetWait() to report multiple events on Windows.
Дата
Msg-id E1qeVL3-002uxz-Vn@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Teach WaitEventSetWait() to report multiple events on Windows.

The WAIT_USE_WIN32 implementation of WaitEventSetWait() previously
reported at most one event per call, because that's what the underlying
WaitForMultipleObjects() call does.

We can make the behavior match the three Unix implementations by looping
until our output buffer is full, or there are no more events available
now.  This makes no difference to most callers including the regular
FEBE socket code, since they ask for at most one event anyway.  A
difference in socket accept priority might be perceived by end users
after commit 7389aad6 started using WaitEventSet in the postmaster.
With this commit, the accept order now matches Unix systems, servicing
listening sockets in round-robin order.

We decided it wasn't really a bug or worth back-patching, but it seems
good to align the behavior across platforms.

Reviewed-by: Andres Freund <andres@anarazel.de> (earlier version)
Tested-by: "Wei Wang (Fujitsu)" <wangw.fnst@fujitsu.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2BA2dk29hr5zRP3HVJQ-_PncNJM6HVQ7aaYLXLRBZU-xw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/04a09ee944ac904c7fb7ca8f7230a524f514b3e7

Modified Files
--------------
src/backend/storage/ipc/latch.c | 228 +++++++++++++++++++++++-----------------
1 file changed, 132 insertions(+), 96 deletions(-)


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: pgsql: Remove some more "snapshot too old" vestiges.
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: doc: Extend documentation of PG_TEST_EXTRA