low wal_retrieve_retry_interval causes missed signals on Windows

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема low wal_retrieve_retry_interval causes missed signals on Windows
Дата
Msg-id 20230111061116.GA1668254@nathanxps13
обсуждение исходный текст
Ответы Re: low wal_retrieve_retry_interval causes missed signals on Windows  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
I discussed this elsewhere [0], but I thought it deserved its own thread.

After setting wal_retrieve_retry_interval to 1ms in the tests, I noticed
that some of the archiving tests began consistently failing on Windows.  I
believe the problem is that WaitForWALToBecomeAvailable() depends on the
call to WaitLatch() for wal_retrieve_retry_interval to ensure that signals
are dispatched (i.e., pgwin32_dispatch_queued_signals()).  With a low retry
interval, WaitForWALToBecomeAvailable() might skip the call to WaitLatch(),
and the signals are never processed.

The attached patch fixes this by always calling WaitLatch(), even if
wal_retrieve_retry_interval milliseconds have already elapsed and the
timeout is 0.

[0] https://postgr.es/m/20221231235019.GA1223171%40nathanxps13

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: Perform streaming logical transactions by background workers and parallel apply
Следующее
От: Peter Smith
Дата:
Сообщение: Re: [DOCS] Stats views and functions not in order?