summaryrefslogtreecommitdiff
path: root/src/include/access/parallel.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-04-14 23:50:16 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-04-14 23:50:16 -0400
commit32470825d36d99a81347ee36c181d609c952c061 (patch)
tree0fe8bfc11dbb20ae8dfe943632674cd3bc859b79 /src/include/access/parallel.h
parent5a617ab3e691aec56725960e6d28c98c8af6ddaa (diff)
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
Diffstat (limited to 'src/include/access/parallel.h')
-rw-r--r--src/include/access/parallel.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/include/access/parallel.h b/src/include/access/parallel.h
index 5065a3830cf..590e27a4845 100644
--- a/src/include/access/parallel.h
+++ b/src/include/access/parallel.h
@@ -35,7 +35,6 @@ typedef struct ParallelContext
SubTransactionId subid;
int nworkers;
int nworkers_launched;
- parallel_worker_main_type entrypoint;
char *library_name;
char *function_name;
ErrorContextCallback *error_context_stack;
@@ -52,8 +51,7 @@ extern bool InitializingParallelWorker;
#define IsParallelWorker() (ParallelWorkerNumber >= 0)
-extern ParallelContext *CreateParallelContext(parallel_worker_main_type entrypoint, int nworkers);
-extern ParallelContext *CreateParallelContextForExternalFunction(char *library_name, char *function_name, int nworkers);
+extern ParallelContext *CreateParallelContext(const char *library_name, const char *function_name, int nworkers);
extern void InitializeParallelDSM(ParallelContext *pcxt);
extern void ReinitializeParallelDSM(ParallelContext *pcxt);
extern void LaunchParallelWorkers(ParallelContext *pcxt);