postgresql/contrib/postgres_fdw
Fujii Masao 88d7748d2a postgres_fdw: Give user mapping precedence for use_scram_passthrough
Previously, when use_scram_passthrough was specified on both a foreign server
and a user mapping, the server-level setting took precedence over the
user-mapping setting. This was inconsistent with the usual semantics of
postgres_fdw options, where foreign server options provide shared defaults
and user mapping options override them on a per-user basis.

This commit updates postgres_fdw so that the user-mapping setting takes
precedence when use_scram_passthrough is specified in both places. This
matches the behavior of other connection options such as sslcert and sslkey.

Backpatch to v18, where use_scram_passthrough was introduced. In v18,
this only affects limited configurations that specify conflicting values
at both the foreign server and user-mapping levels. In such cases, users
would naturally expect the user-mapping setting to override the server-level
setting, so changing the behavior should be minimally disruptive.
Also keeping v18 as the only branch with different semantics for
use_scram_passthrough would be unnecessarily confusing, so backpatch
this fix to v18.

Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwEJ8rZjmbOvCicyr4vbuLio082bNTde0WNoSWaWr9wVcg@mail.gmail.com
Backpatch-through: 18
2026-05-26 00:47:43 +09:00
..
expected postgres_fdw: Fix handling of abort-cleanup-failed connections. 2026-05-05 18:55:02 +09:00
specs postgres_fdw: Add more test coverage for EvalPlanQual testing. 2025-11-06 12:15:01 +09:00
sql postgres_fdw: Fix handling of abort-cleanup-failed connections. 2026-05-05 18:55:02 +09:00
t postgres_fdw: Give user mapping precedence for use_scram_passthrough 2026-05-26 00:47:43 +09:00
.gitignore Fix EvalPlanQual handling of foreign/custom joins in ExecScanFetch. 2025-10-15 17:15:01 +09:00
connection.c postgres_fdw: Give user mapping precedence for use_scram_passthrough 2026-05-26 00:47:43 +09:00
deparse.c Convert PathKey to use CompareType 2025-04-04 11:22:20 +02:00
Makefile Fix EvalPlanQual handling of foreign/custom joins in ExecScanFetch. 2025-10-15 17:15:01 +09:00
meson.build Fix EvalPlanQual handling of foreign/custom joins in ExecScanFetch. 2025-10-15 17:15:01 +09:00
option.c Remove INT64_HEX_FORMAT and UINT64_HEX_FORMAT 2025-08-06 10:58:06 +02:00
postgres_fdw--1.0--1.1.sql postgres_fdw: Add functions to discard cached connections. 2021-01-26 15:35:54 +09:00
postgres_fdw--1.0.sql Add postgres_fdw contrib module. 2013-02-21 05:27:16 -05:00
postgres_fdw--1.1--1.2.sql postgres_fdw: Extend postgres_fdw_get_connections to return remote backend PID. 2025-03-03 08:51:30 +09:00
postgres_fdw.c Fix memory leakage in postgres_fdw's DirectModify code path. 2025-05-30 13:45:41 -04:00
postgres_fdw.control postgres_fdw: Add "used_in_xact" column to postgres_fdw_get_connections(). 2024-07-26 22:15:51 +09:00
postgres_fdw.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
shippable.c Update copyright for 2025 2025-01-01 11:21:55 -05:00