=== Applying patches on top of PostgreSQL commit ID f58623faa856cfac67f1ff54b951f82f81fa1f59 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Mon Jun 8 10:41:24 UTC 2026 On branch cf/6864 nothing to commit, working tree clean === using 'git am' to apply patch ./0001-libpq-oauth-Warn-when-PGOAUTHDEBUG-trace-may-expose-.patch === Applying: libpq-oauth: Warn when PGOAUTHDEBUG trace may expose secrets === using 'git am' to apply patch ./rel18-0001-libpq-oauth-Warn-when-PGOAUTHDEBUG-trace-may-expose-.patch === Applying: libpq-oauth: Warn when PGOAUTHDEBUG trace may expose secrets Using index info to reconstruct a base tree... M src/interfaces/libpq-oauth/oauth-curl.c Falling back to patching base and 3-way merge... Auto-merging src/interfaces/libpq-oauth/oauth-curl.c CONFLICT (content): Merge conflict in src/interfaces/libpq-oauth/oauth-curl.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 libpq-oauth: Warn when PGOAUTHDEBUG trace may expose secrets When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./rel18-0001-libpq-oauth-Warn-when-PGOAUTHDEBUG-trace-may-expose-.patch === patching file src/interfaces/libpq-oauth/oauth-curl.c Hunk #1 FAILED at 2796. Hunk #2 succeeded at 3046 with fuzz 2 (offset -36 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/interfaces/libpq-oauth/oauth-curl.c.rej Unstaged changes after reset: M src/interfaces/libpq-oauth/oauth-curl.c Removing src/interfaces/libpq-oauth/oauth-curl.c.rej === using 'git apply' to apply patch ./rel18-0001-libpq-oauth-Warn-when-PGOAUTHDEBUG-trace-may-expose-.patch === Applied patch to 'src/interfaces/libpq-oauth/oauth-curl.c' with conflicts. U src/interfaces/libpq-oauth/oauth-curl.c diff --cc src/interfaces/libpq-oauth/oauth-curl.c index 62fb4d87489,905c26a014a..00000000000 --- a/src/interfaces/libpq-oauth/oauth-curl.c +++ b/src/interfaces/libpq-oauth/oauth-curl.c @@@ -2794,11 -2766,53 +2794,56 @@@ done * provider. */ static PostgresPollingStatusType -pg_fe_run_oauth_flow_impl(PGconn *conn) +pg_fe_run_oauth_flow_impl(PGconn *conn, PGoauthBearerRequestV2 *request, + int *altsock) { - fe_oauth_state *state = conn_sasl_state(conn); - struct async_ctx *actx; + struct async_ctx *actx = request->v1.user; char *oauth_token = NULL; ++<<<<<<< ours ++======= + PQExpBuffer errbuf; + + if (!initialize_curl(conn)) + return PGRES_POLLING_FAILED; + + if (!state->async_ctx) + { + /* + * Create our asynchronous state, and hook it into the upper-level + * OAuth state immediately, so any failures below won't leak the + * context allocation. + */ + actx = calloc(1, sizeof(*actx)); + if (!actx) + { + libpq_append_conn_error(conn, "out of memory"); + return PGRES_POLLING_FAILED; + } + + actx->mux = PGINVALID_SOCKET; + actx->timerfd = -1; + + /* Should we enable unsafe features? */ + actx->debugging = oauth_unsafe_debugging_enabled(); + + if (actx->debugging) + fprintf(stderr, + libpq_gettext("WARNING: PGOAUTHDEBUG trace is enabled. HTTP traffic (including secrets) will be logged.\n")); + + state->async_ctx = actx; + + initPQExpBuffer(&actx->work_data); + initPQExpBuffer(&actx->errbuf); + + if (!setup_multiplexer(actx)) + goto error_return; + + if (!setup_curl_handles(actx)) + goto error_return; + } + + actx = state->async_ctx; ++>>>>>>> theirs do { @@@ -3041,7 -3086,7 +3086,11 @@@ pg_fe_run_oauth_flow(PGconn *conn, stru actx->dbg_num_calls); } ++<<<<<<< ours + if ((actx->debug_flags & OAUTHDEBUG_UNSAFE_TRACE) ++======= + if (actx && actx->debugging ++>>>>>>> theirs && (result == PGRES_POLLING_OK || result == PGRES_POLLING_FAILED)) fprintf(stderr, libpq_gettext("WARNING: PGOAUTHDEBUG trace output above may contain secrets. Do not share with third parties.\n"));