Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 991407a
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 20cbe59
Choose a head ref
  • 2 commits
  • 25 files changed
  • 3 contributors

Commits on Apr 30, 2025

  1. oauth: Move the builtin flow into a separate module

    The additional packaging footprint of the OAuth Curl dependency, as well
    as the existence of libcurl in the address space even if OAuth isn't
    ever used by a client, has raised some concerns. Split off this
    dependency into a separate loadable module called libpq-oauth.
    
    When configured using --with-libcurl, libpq.so searches for this new
    module via dlopen(). End users may choose not to install the libpq-oauth
    module, in which case the default flow is disabled.
    
    For static applications using libpq.a, the libpq-oauth staticlib is a
    mandatory link-time dependency for --with-libcurl builds. libpq.pc has
    been updated accordingly.
    
    The default flow relies on some libpq internals. Some of these can be
    safely duplicated (such as the SIGPIPE handlers), but others need to be
    shared between libpq and libpq-oauth for thread-safety. To avoid
    exporting these internals to all libpq clients forever, these
    dependencies are instead injected from the libpq side via an
    initialization function. This also lets libpq communicate the offsets of
    PGconn struct members to libpq-oauth, so that we can function without
    crashing if the module on the search path came from a different build of
    Postgres. (A minor-version upgrade could swap the libpq-oauth module out
    from under a long-running libpq client before it does its first load of
    the OAuth flow.)
    
    This ABI is considered "private". The module has no SONAME or version
    symlinks, and it's named libpq-oauth-<major>.so to avoid mixing and
    matching across Postgres versions. (Future improvements may promote this
    "OAuth flow plugin" to a first-class concept, at which point we would
    need a public API to replace this anyway.)
    
    Additionally, NLS support for error messages in b3f0be7 was
    incomplete, because the new error macros weren't being scanned by
    xgettext. Fix that now.
    
    Per request from Tom Lane and Bruce Momjian. Based on an initial patch
    by Daniel Gustafsson, who also contributed docs changes. The "bare"
    dlopen() concept came from Thomas Munro. Many many people reviewed the
    design and implementation; thank you!
    
    Co-authored-by: Daniel Gustafsson <[email protected]>
    Reviewed-by: Andres Freund <[email protected]>
    Reviewed-by: Christoph Berg <[email protected]>
    Reviewed-by: Jelte Fennema-Nio <[email protected]>
    Reviewed-by: Peter Eisentraut <[email protected]>
    Reviewed-by: Wolfgang Walther <[email protected]>
    Discussion: https://postgr.es/m/641687.1742360249%40sss.pgh.pa.us
    2 people authored and Commitfest Bot committed Apr 30, 2025
    Configuration menu
    Copy the full SHA
    b93213e View commit details
    Browse the repository at this point in the history
  2. [CF 5635] v10 - OAuth Followup Patches

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5635
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/CAOYmi+=UsSnLM4K+hYkhrezpQROQ5jr=72feAkQ0Te8GJf3Fbg@mail.gmail.com
    Author(s): Jacob Champion
    Commitfest Bot committed Apr 30, 2025
    Configuration menu
    Copy the full SHA
    20cbe59 View commit details
    Browse the repository at this point in the history
Loading