From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com> |
Cc: | Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: fdw_scan_tlist for foreign table scans breaks EPQ testing, doesn't it? |
Date: | 2015-07-24 17:58:42 |
Message-ID: | CA+TgmoZy2fBiqBN9-03ZNJ5fx7vh8pwvhpWEX1jk6j1sNk16aQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 23, 2015 at 8:27 PM, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com> wrote:
> A dark side is, as discussed in this thread, complexity of EvalPlanQual.
> RefetchForeignRow() returns a tuple based on foreign table definition,
> on the other hands, whole-row var points a tuple based on fdw_scan_tlist
> if exists.
> An alternative host-only plan-node and relevant expression will be
> constructed towards the definition of base foreign-table. So, we need to
> transform the tuple to the layout based on foreign table definition if
> we allow fdw_scan_tlist with scanrelid > 0.
>
> However, I'm skeptical whether this solution is valid for long term.
> Once we support to push down expensive expression in target-list to
> remote side, fdw_scan_tlist will contain expression node rather than
> simple Var node. In this case, it is not obvious to reproduce a tuple
> according to the foreign table definition from a record based on the
> fdw_scan_tlist.
I don't think we can realistically make a decision that pushing down
target list expressions to the remote side is forever off the table.
Is the problem here that it's not *possible* for an FDW to do the
right thing, or just that it might be difficult to code in practice?
I'm fuzzy on why this isn't just a matter of having
RefetchForeignRow() return a row with the correct tuple descriptor.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2015-07-24 18:00:41 | Re: [PROPOSAL] VACUUM Progress Checker. |
Previous Message | Andres Freund | 2015-07-24 17:58:25 | Re: Free indexed_tlist memory explicitly within set_plan_refs() |