Re: pgsql: Add support for OAUTHBEARER SASL mechanism

Christoph Berg <myon@debian.org>

From: Christoph Berg <myon@debian.org>
To: Daniel Gustafsson <dgustafsson@postgresql.org>, Jacob Champion <jacob.champion@enterprisedb.com>, Thomas Munro <thomas.munro@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-03-31T21:54:30Z
Lists: pgsql-hackers
> Add support for OAUTHBEARER SASL mechanism

Debian still has this experimental port with a GNU userland and a
FreeBSD kernel called kfreebsd. I don't expect anyone to particularly
care about it, but it found an actual bug:

/build/reproducible-path/postgresql-18-18~~devel.20250331/build/../src/interfaces/libpq/fe-auth-oauth-curl.c: In function ‘register_socket’:
/build/reproducible-path/postgresql-18-18~~devel.20250331/build/../src/interfaces/libpq/fe-auth-oauth-curl.c:1317:20: error: ‘actx’ undeclared (first use in this function); did you mean ‘ctx’?
 1317 |         actx_error(actx, "libpq does not support multiplexer sockets on this platform");
      |                    ^~~~

This should not be a compile-time error; actx is not defined outside
the #ifdef blocks there:

/*
 * Adds and removes sockets from the multiplexer set, as directed by the
 * libcurl multi handle.
 */
static int
register_socket(CURL *curl, curl_socket_t socket, int what, void *ctx,
                void *socketp)
{
#ifdef HAVE_SYS_EPOLL_H
    struct async_ctx *actx = ctx;
...
#endif
#ifdef HAVE_SYS_EVENT_H
    struct async_ctx *actx = ctx;
...
#endif

    actx_error(actx, "libpq does not support multiplexer sockets on this platform");
    return -1;
}

https://buildd.debian.org/status/fetch.php?pkg=postgresql-18&arch=hurd-amd64&ver=18%7E%7Edevel.20250331-1&stamp=1743455288&raw=0

Christoph



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: Fix build on platforms without epoll/kqueue

  2. Add support for OAUTHBEARER SASL mechanism