Re: [oauth] Stabilize the libpq-oauth ABI (and allow alternative implementations?)

Jacob Champion <jacob.champion@enterprisedb.com>

From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Zsolt Parragi <zsolt.parragi@percona.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Chao Li <li.evan.chao@gmail.com>
Date: 2026-03-10T23:27:24Z
Lists: pgsql-hackers
On Tue, Mar 10, 2026 at 3:10 PM Zsolt Parragi <zsolt.parragi@percona.com> wrote:
> +#define MASK_BITS ((uintptr_t) 0x55aa55aa55aa55aa)
>
>  Won't this cause a warning in 32 bit builds? (0x55aa55aa definitely
> should work in both?)

Hopefully not -- it's an explicit rather than implicit truncation, and
we've required 64-bit integer support from our compilers for a long
time now. But I'm bad at keeping the rules in my head; did you have a
particular compiler in mind?

(The 32-bit build in Cirrus doesn't seem to mind this, though it does
mind the unused variables that I forgot to wrap in USE_VALGRIND...
will fix.)

--Jacob



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. libpq: Allow developers to reimplement libpq-oauth

  2. libpq: Poison the v2 part of a v1 Bearer request

  3. libpq-oauth: Never link against libpq's encoding functions

  4. libpq-oauth: Use the PGoauthBearerRequestV2 API

  5. libpq: Introduce PQAUTHDATA_OAUTH_BEARER_TOKEN_V2

  6. libpq: Add PQgetThreadLock() to mirror PQregisterThreadLock()

  7. oauth: Report cleanup errors as warnings on stderr

  8. oauth_validator: Avoid races in log_check()

  9. libpq-oauth: use correct c_args in meson.build

  10. libpq-fe.h: Don't claim SOCKTYPE in the global namespace