From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely() |
Date: | 2020-05-25 13:02:04 |
Message-ID: | 9706845c-3b28-6643-8c26-0b129306e786@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 5/12/20 8:06 AM, Joe Conway wrote:
> I was doing some memory testing under fractional CPU allocations and it became
> painfully obvious that the repeat() function needs CHECK_FOR_INTERRUPTS().
>
> I exchanged a few emails offlist with Tom about it, and (at the risk of putting
> words in his mouth) he agreed and felt it was a candidate for backpatching.
>
> Very small patch attached. Quick and dirty performance test:
<snip>
> While discussing the above, Tom also wondered whether we should add unlikely()
> to the CHECK_FOR_INTERRUPTS() macro.
>
> Small patch for that also attached. I was not sure about the WIN32 stanza on
> that (to do it or not; if so, what about the UNBLOCKED_SIGNAL_QUEUE() test).
>
> I tested as above with unlikely() and did not see any discernible difference,
> but the added check might improve other code paths.
>
> Comments or objections?
Seeing none ... I intend to backpatch and push these two patches in the next day
or so.
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2020-05-25 13:28:54 | Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch |
Previous Message | Tomas Vondra | 2020-05-25 12:17:22 | Re: Trouble with hashagg spill I/O pattern and costing |