|From:||Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>|
|Subject:||Reworks of CustomScan serialization/deserialization|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
I'd like to adjust a few of custom-scan interface prior to v9.6 freeze.
The major point is serialization/deserialization mechanism.
Now, extension has to give LibraryName and SymbolName to reproduce
same CustomScanMethods on the background worker process side. Indeed,
it is sufficient information to pull the table of function pointers.
On the other hands, we now have different mechanism to wrap private
information - extensible node. It requires extensions to register its
ExtensibleNodeMethods identified by name, usually, on _PG_init() time.
It is also reasonable way to reproduce same objects on background
However, mixture of two different ways is not good. My preference is
what extensible-node is doing rather than what custom-scan is currently
The attached patch allows extension to register CustomScanMethods once,
then readFunc.c can pull this table by CustomName in string form.
The minor one is header file location of CustomXXXXMethods declaration.
These are currently declared at relation.h, plannodes.h and execnodes.h.
These files are very primitive, so we put these lines:
struct ParallelContext; /* avoid including parallel.h here */
struct shm_toc; /* avoid including shm_toc.h here */
struct ExplainState; /* avoid including explain.h here */
to avoid inclusion of other headers here.
It seems to me CustomXXXXMethods shall be moved to somewhere appropriate,
like fdwapi.h for FDW. If we put "struct CustomXXXXMethods;" on these
primitive header files instead, it will work.
I'm not 100% certain whether "nodes/custom-apis.h" is the best location,
but somewhere we can put these declarations rather than the primitive
header files might be needed.
NEC Business Creation Division / PG-Strom Project
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
|Next Message||Michael Paquier||2016-02-29 12:39:33||Re: Compilation broken when OPTIMIZER_DEBUG is set|
|Previous Message||Michael Paquier||2016-02-29 11:54:07||Re: WIP: Access method extendability|