Re: [PATCH] OAuth: fix performance bug with stuck multiplexer events
Jacob Champion <jacob.champion@enterprisedb.com>
From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: Thomas Munro <thomas.munro@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Daniel Gustafsson <daniel@yesql.se>, Peter Eisentraut <peter@eisentraut.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2025-08-12T22:11:44Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
oauth: Always link with -lm for floor()
- e76738e59790 18.0 landed
- 52ecd05aeef8 19 (unreleased) landed
-
oauth: Add unit tests for multiplexer handling
- 4e1e417330d4 19 (unreleased) landed
- 1443b6c0eaa2 19 (unreleased) landed
-
oauth: Ensure unused socket registrations are removed
- 16b0c48583a5 18.0 landed
- 3d9c03429a82 19 (unreleased) landed
-
oauth: Remove expired timers from the multiplexer
- e507e08acf63 18.0 landed
- 1749a12f0d20 19 (unreleased) landed
-
oauth: Remove stale events from the kqueue multiplexer
- ff181d1f876f 18.0 landed
- ff5b0824b3b0 19 (unreleased) landed
-
oauth: Track total call count during a client flow
- 41aac1483a6c 18.0 landed
- 3e311664e497 19 (unreleased) landed
Attachments
- since-v4.diff.txt (text/plain)
- v5-0001-oauth-Always-link-with-lm-for-floor.patch (application/octet-stream) patch v5-0001
- v5-0002-oauth-Add-unit-tests-for-multiplexer-handling.patch (application/octet-stream) patch v5-0002
On Fri, Aug 8, 2025 at 2:31 PM Jacob Champion <jacob.champion@enterprisedb.com> wrote: > Well, thank you for the explanation. I'll make that change. Done in v5. v5-0001 is planned for backport to 18 once the freeze lifts. It ensures that -lm is part of the link line for libpq-oauth, since the module uses floor(). I probably wouldn't have ever noticed, except that the new test executable, which uses the same link flags, complained on Clang [1]. (In that thread, I incorrectly said the problem was with "Meson animals". The Meson side is fine, and both alligator and bushmaster use Autoconf, so I'm not sure how I ended up with that idea.) v5-0002 should fix the more general buildfarm failure that caused the revert. The farm finds the new t/ subdirectory and starts running Make on src/interfaces/libpq-oauth directly, bypassing the skip logic in src/interfaces/Makefile. So I've wrapped the "standard" top-level targets that build and install things in a conditional. The targets that clean things up have been left alone, at Tom's suggestion in [1]. Thanks, --Jacob [1] https://postgr.es/m/CAOYmi%2Bm%3DxY0P_uAzAP_884uF-GhQ3wrineGwc9AEnb6fYxVqVQ%40mail.gmail.com