Re: Custom Scan APIs (Re: Custom Plan node)
Kohei KaiGai <kaigai@kaigai.gr.jp>
From: Kohei KaiGai <kaigai@kaigai.gr.jp>
To: Shigeru Hanada <shigeru.hanada@gmail.com>
Cc: KaiGai Kohei <kaigai@ak.jp.nec.com>, Jim Mlodgenski <jimmy76@gmail.com>,
Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
PgHacker <pgsql-hackers@postgresql.org>, Peter Eisentraut <peter_e@gmx.net>
Date: 2014-01-14T14:19:45Z
Lists: pgsql-hackers
Attachments
- pgsql-v9.4-custom-scan.part-1.v5.patch (application/octet-stream) patch v9
- pgsql-v9.4-custom-scan.part-2.v5.patch (application/octet-stream) patch v9
- pgsql-v9.4-custom-scan.part-3.v5.patch (application/octet-stream) patch v9
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>
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Support multi-argument UNNEST(), and TABLE() syntax for multiple functions.
- 784e762e886e 9.4.0 cited