[oauth] Increased CPU usage during device flow with libcurl 8.20.0

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: [oauth] Increased CPU usage during device flow with libcurl 8.20.0
Date: 2026-06-15 19:28:17
Message-ID: CAOYmi+=yrwMSsHuNJ1V14isA4iSix5Xb3P3VEp1X0BS61MdV4A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

A couple of macOS testers pinged me last week with a newly failing
test in oauth_validator/001_server:

not ok 113 - call count is reasonably small

It's a heuristic test, so I was looking into whether that heuristic
needed to be tweaked. But this is actually a legitimate failure,
caused by an upstream regression in Curl 8.20.0 [1]. I've tested the
most recent 8.21.0 RC, due to release later this month, and the test
now passes again.

So that just leaves what to do about the current test failures. My
current idea is to just skip the test if the curl binary reports that
specific minor version. (A configure test probably won't help very
much after this month: anyone consuming rolling releases of Curl in
production will have already built against a past version, and if an
upcoming LTS distro chose 8.20.0 as its base, they'd almost certainly
backport the fix too, making the check worse than nothing.) An
alternative would be to just let it ride for a couple weeks, but I
don't really want to inflict that on our Homebrew testers.

Either way, debugging this has inspired some improvements to
OAUTHDEBUG_UNSAFE_TRACE that I'll propose after the 19 freeze is over.

Thoughts?

--Jacob

[1] https://github.com/curl/curl/issues/21547

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-06-15 19:36:57 Re: Do quoting more carefully in replication commands
Previous Message Corey Huinker 2026-06-15 19:25:39 Re: pg_restore handles extended statistics inconsistently with statistics data