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>
Date: 2025-08-08T21:31:49Z
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 →
  1. oauth: Always link with -lm for floor()

  2. oauth: Add unit tests for multiplexer handling

  3. oauth: Ensure unused socket registrations are removed

  4. oauth: Remove expired timers from the multiplexer

  5. oauth: Remove stale events from the kqueue multiplexer

  6. oauth: Track total call count during a client flow

On Fri, Aug 8, 2025 at 2:16 PM Dagfinn Ilmari Mannsåker
<ilmari@ilmari.org> wrote:
> That's because encode_json has a prototype[1], which changes how the
> argument list is parsed: no longer just as a flat list of values like a
> normal function.  Specifically, it has a prototype of '$', which means
> it only takes one argument, which is evaluated in scalar context.  So
> the first example is a syntax error, but in the second example the
> parenthesised expression is the single argument.  Becuse it's in scalar
> context, the comma is actually the scalar comma operator, not the list
> element separator, so the return value is the right-hand side of the
> comma (just like in C), not the length of the would-be list.

ron-swanson-throws-away-computer.gif

Well, thank you for the explanation. I'll make that change.

--Jacob