Re: Custom Scan APIs (Re: Custom Plan node)

Поиск
Список
Период
Сортировка
От Kohei KaiGai
Тема Re: Custom Scan APIs (Re: Custom Plan node)
Дата
Msg-id CADyhKSXSp9UeOR95SV_441UprDOqZO3SZyrUk4-uTAi+Kz66fA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Custom Scan APIs (Re: Custom Plan node)  (Shigeru Hanada <shigeru.hanada@gmail.com>)
Ответы Re: Custom Scan APIs (Re: Custom Plan node)  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
Hello,

The attached patches are the ones rebased to the latest git tree, but
no functional
changes from the previous revision on the commit-fest:Nov.
Hanada-san volunteered to review the series of patches, including the
portion for
postgres_fdw, then marked it as "ready for committer" on the last commit fest.
So, I hope someone of committer also volunteer to review the patches for final
checking.

* Part-1 - CustomScan APIs
This patch provides a set of interfaces to interact query-optimizer
and -executor
for extensions. The new add_scan_path_hook or add_join_path_hook allows to
offer alternative ways to scan a particular relation or to join a
particular relations.
Then, once the alternative ways are chosen by the optimizer,
associated callbacks
shall be kicked from the executor. In this case, extension has responsibility to
return a slot that hold a tuple (or empty for end of scan) being
scanned from the
underlying relation.

* Part-2 - contrib/ctidscan
This patch provides a simple example implementation of CustomScan API.
It enables to skip pages when inequality operators are given on ctid system
columns. That is, at least, better than sequential full-scan, so it usually wins
to SeqScan, but Index-scan is much better.

* Part-3 - remote join implementation
This patch provides an example to replace a join by a custom scan node that
runs on a result set of remote join query, on top of existing postgres_fdw
extension. The idea is, a result set of remote query looks like a relation but
intangible, thus, it is feasible to replace a local join by a scan on the result
set of a query executed on the remote host, if both of the relation to be joined
belongs to the identical foreign server.
This patch gives postgres_fdw a capability to run a join on the remote host.

Thanks,


2013/12/16 Shigeru Hanada <shigeru.hanada@gmail.com>:
> KaiGai-san,
>
> 2013/12/16 KaiGai Kohei <kaigai@ak.jp.nec.com>:
>> (2013/12/16 14:15), Shigeru Hanada wrote:
>>> (1) ctidscan
>>> Is session_preload_libraries available to enable the feature, like
>>> shared_*** and local_***?  According to my trial it works fine like
>>> two similar GUCs.
>>>
>> It shall be available; nothing different from the two parameters that
>> we have supported for long time. Sorry, I missed the new feature to
>> mention about.
>
> Check.
>
>>> (2) postgres_fdw
>>> JOIN push--down is a killer application of Custom Scan Provider
>>> feature, so I think it's good to mention it in the "Remote Query
>>> Optimization" section.
>>>
>> I added an explanation about remote join execution on the section.
>> Probably, it help users understand why Custom Scan node is here
>> instead of Join node. Thanks for your suggestion.
>
> Check.
>
> I think that these patches are enough considered to mark as "Ready for
> Committer".
>
> Regards,
> --
> Shigeru HANADA



--
KaiGai Kohei <kaigai@kaigai.gr.jp>

Вложения

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

Предыдущее
От: Oskari Saarenmaa
Дата:
Сообщение: Re: [PATCH] Filter error log statements by sqlstate
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: Optimize kernel readahead using buffer access strategy