On 5/25/20 9:52 AM, Tom Lane wrote: > Joe Conway <m...@joeconway.com> writes: >>> Comments or objections? > >> Seeing none ... I intend to backpatch and push these two patches in the next >> day >> or so. > > There was some question as to what (if anything) to do with the Windows > version of CHECK_FOR_INTERRUPTS. Have you resolved that?
Relevant hunk: *************** do { \ *** 107,113 **** do { \ if (UNBLOCKED_SIGNAL_QUEUE()) \ pgwin32_dispatch_queued_signals(); \ ! if (InterruptPending) \ ProcessInterrupts(); \ } while(0) #endif /* WIN32 */ --- 107,113 ---- do { \ if (UNBLOCKED_SIGNAL_QUEUE()) \ pgwin32_dispatch_queued_signals(); \ ! if (unlikely(InterruptPending)) \ ProcessInterrupts(); \ } while(0) #endif /* WIN32 */ Two questions. First, as I understand it, unlikely() is a gcc thing, so it does nothing at all for MSVC builds of Windows, which presumably are the predominate ones. The question here is whether it is worth doing at all for Windows builds. On the other hand it seems unlikely to harm anything, so I think it is reasonable to leave the patch as is in that respect. The second question is whether UNBLOCKED_SIGNAL_QUEUE() warrants its own likely() or unlikely() wrapper. I have no idea, but we could always add that later if someone deems it worthwhile. Joe -- Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development
signature.asc
Description: OpenPGP digital signature