From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | low wal_retrieve_retry_interval causes missed signals on Windows |
Date: | 2023-01-11 06:11:16 |
Message-ID: | 20230111061116.GA1668254@nathanxps13 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
v1-0001-ensure-signals-are-dispatched-in-startup-process-.patch | text/x-diff | 2.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2023-01-11 06:11:38 | Re: [DOCS] Stats views and functions not in order? |
Previous Message | Dilip Kumar | 2023-01-11 06:03:50 | Re: Perform streaming logical transactions by background workers and parallel apply |