From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Work around OAuth/EVFILT_TIMER quirk on NetBSD. |
Date: | 2025-03-01 01:42:29 |
Message-ID: | E1toBs5-000DbH-28@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Work around OAuth/EVFILT_TIMER quirk on NetBSD.
NetBSD's EVFILT_TIMER doesn't like zero timeouts, as introduced by
commit b3f0be788. Steal the workaround from the same problem on Linux
from a few lines up: round zero up to one. Do this only for NetBSD, as
the other systems with the kevent() API accept zero and shouldn't have
to insert a small bogus wait.
Future improvement ideas:
* when NetBSD < 10 falls out of support, we could try NODE_ABSTIME for
the "fire now" meaning if timeout == 0
* when libcurl tells us to start a 0ms timer and call it back, we could
figure out how to handle that more directly without involving the
kernel (the current architecture doesn't make that straightforward)
Failures with EINVAL errors could be seen on the new optional NetBSD CI
task that we're trying to keep green as a candidate for inclusion as
default-enabled CI task. The NetBSD build farm animals aren't testing
OAuth yet, so no breakage there.
Reviewed-by: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Discussion: https://postgr.es/m/CA%2BhUKGJ%2BWyJ26QGvO_nkgvbxgw%2B03U4EQ4Hxw%2BQBft6Np%2BXW7w%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c301a0a74a8aa9ec4fe1f364e05aa17a649f7260
Modified Files
--------------
src/interfaces/libpq/fe-auth-oauth-curl.c | 10 ++++++++++
1 file changed, 10 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-03-01 08:23:28 | pgsql: Set amcancrosscompare to true for hash |
Previous Message | Masahiko Sawada | 2025-02-28 23:35:03 | Re: pgsql: Refactor COPY FROM to use format callback functions. |