Reworks of CustomScan serialization/deserialization

Поиск
Список
Период
Сортировка
От Kouhei Kaigai
Тема Reworks of CustomScan serialization/deserialization
Дата
Msg-id 9A28C8860F777E439AA12E8AEA7694F8011B6232@BPXM15GP.gisp.nec.co.jp
обсуждение исходный текст
Ответы Re: Reworks of CustomScan serialization/deserialization  (Petr Jelinek <petr@2ndquadrant.com>)
Список pgsql-hackers
Hello,

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
worker side.

However, mixture of two different ways is not good. My preference is
what extensible-node is doing rather than what custom-scan is currently
doing.
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.

Thanks,
--
NEC Business Creation Division / PG-Strom Project
KaiGai Kohei <kaigai@ak.jp.nec.com>

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: WIP: Access method extendability
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Compilation broken when OPTIMIZER_DEBUG is set