]> git.ipfire.org Git - thirdparty/postgresql.git/commit
postgres_fdw and dblink should check if backend has MyProcPort
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 8 Aug 2025 17:34:31 +0000 (19:34 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 8 Aug 2025 17:34:31 +0000 (19:34 +0200)
commit138750dde4a8b939a30a6d650c6c8146192b39cb
tree334e9d75312da55c55e933410a8d1484e1ed5067
parentebaaf386adb133010c2024256521b993c5e53e98
postgres_fdw and dblink should check if backend has MyProcPort

before checking ->has_scram_keys.  MyProcPort is NULL in background
workers.  So this could crash for example if a background worker
accessed a suitable configured foreign table.

Author: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/27b29a35-9b96-46a9-bc1a-914140869dac%40gmail.com
contrib/dblink/dblink.c
contrib/postgres_fdw/connection.c