pgsql: Avoid passing function pointers across process boundaries.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid passing function pointers across process boundaries.
Date: 2017-04-15 03:50:26
Message-ID: E1czEjC-0007v5-VS@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid passing function pointers across process boundaries.

We'd already recognized that we can't pass function pointers across process
boundaries for functions in loadable modules, since a shared library could
get loaded at different addresses in different processes. But actually the
practice doesn't work for functions in the core backend either, if we're
using EXEC_BACKEND. This is the cause of recent failures on buildfarm
member culicidae. Switch to passing a string function name in all cases.

Something like this needs to be back-patched into 9.6, but let's see
if the buildfarm likes it first.

Petr Jelinek, with a bunch of basically-cosmetic adjustments by me

Discussion: https://postgr.es/m/548f9c1d-eafa-e3fa-9da8-f0cc2f654e60@2ndquadrant.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/32470825d36d99a81347ee36c181d609c952c061

Modified Files
--------------
src/backend/access/transam/README.parallel | 2 +-
src/backend/access/transam/parallel.c | 193 ++++++++++++++++-------------
src/backend/executor/execParallel.c | 7 +-
src/backend/postmaster/bgworker.c | 105 +++++++++-------
src/backend/utils/fmgr/dfmgr.c | 15 ++-
src/backend/utils/fmgr/fmgr.c | 2 +-
src/include/access/parallel.h | 4 +-
src/include/executor/execParallel.h | 2 +
src/include/fmgr.h | 6 +-
9 files changed, 187 insertions(+), 149 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2017-04-15 13:49:17 pgsql: Downcase "Wincrypt.h"
Previous Message Peter Eisentraut 2017-04-14 23:37:25 pgsql: doc: Fix typo