Re: [v9.5] Custom Plan API

From: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
To: Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org>, Jim Mlodgenski <jimmy76(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: [v9.5] Custom Plan API
Date: 2014-07-23 01:47:11
Message-ID: CADyhKSVJcy4kANk_ua0NV8V04LCFAX9Bpj5B7Uc7g7XFitfRJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-07-18 10:28 GMT+09:00 Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>:
>> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
>> > I haven't followed this at all, but I just skimmed over it and noticed
>> > the CustomPlanMarkPos thingy; apologies if this has been discussed
>> > before. It seems a bit odd to me; why isn't it sufficient to have a
>> > boolean flag in regular CustomPlan to indicate that it supports
>> > mark/restore?
>>
>> Yeah, I thought that was pretty bogus too, but it's well down the list of
>> issues that were there last time I looked at this ...
>>
> IIRC, CustomPlanMarkPos was suggested to keep the interface of
> ExecSupportsMarkRestore() that takes plannode tag to determine
> whether it support Mark/Restore.
> As my original proposition did, it seems to me a flag field in
> CustomPlan structure is straightforward, if we don't hesitate to
> change ExecSupportsMarkRestore().
>
The attached patch revised the above point.
It eliminates CustomPlanMarkPos, and adds flags field on CustomXXX
structure to inform the backend whether the custom plan provider can
support mark-restore position and backward scan.
This change requires ExecSupportsMarkRestore() to reference
contents of Path node, not only node-tag, so its declaration was also
changed to take a pointer to Path node.
The only caller of this function is final_cost_mergejoin() right now.
It just gives pathtype field of Path node on its invocation, so this change
does not lead significant degradation.

Thanks,
--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

Attachment Content-Type Size
pgsql-v9.5-custom-plan.v6.patch application/octet-stream 151.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2014-07-23 01:49:14 Re: Shared Data Structure b/w clients
Previous Message Craig Ringer 2014-07-23 01:46:14 Re: Shared Data Structure b/w clients