planstate_tree_walker oversight CustomScan

From: Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: planstate_tree_walker oversight CustomScan
Date: 2015-09-21 13:54:01
Message-ID: 9A28C8860F777E439AA12E8AEA7694F801148C64@BPXM15GP.gisp.nec.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

The planstate_tree_walker() oversight custom_ps of CustomScanState;
that should be a list of underlying PlanState object if any.

ExplainPreScanNode() treated ForeignScan and CustomScan in special
way (it is sufficient for ExplainPreScanNode() purpose), thus, it
didn't implement its recursive portion originally.

The job of ExplainPreScanNode() is know all the relids involved
in a particular subquery execution. On the other hands, fs_relids
of ForeignScan and custom_relids of CustomScan informs a set of
relids to be scanned by this Scan node without recursive, so it
did not have recursive walks on the underlying sub-plans.

However, planstate_tree_walker() will have different expectation.
It is general walker routine, thus, it is natural users to expect
the callback is also kicked towards the underlying planstate of
CustomScan (and ForeignScan; once EPQ recheck gets solved).

The attached patch adds support of CustomScan on the walker.

Thanks,
--
NEC Business Creation Division / PG-Strom Project
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>

Attachment Content-Type Size
pgsql-planstate_tree_walker-oversight-custom-scan.v1.patch application/octet-stream 910 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Verite 2015-09-21 13:58:16 Re: [patch] Proposal for \rotate in psql
Previous Message Stephen Frost 2015-09-21 13:30:15 Re: row_security GUC, BYPASSRLS