From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: tgl@sss.pgh.pa.us
Cc: sfrost@snowman.net
Cc: shigeo.hirose@toshiba.co.jp
Cc: pgsql-general@lists.postgresql.org
Subject: Re: How can I pushdown of functions used in targetlist with FDW ?
Date: Fri, 10 Jan 2020 10:07:48 +0900 (JST)
Message-ID: <20200110.100748.1958346513350741032.horikyota.ntt@gmail.com> (raw)
In-Reply-To: <8248.1578597145@sss.pgh.pa.us>
References: <3239.1578591103@sss.pgh.pa.us>
<20200109184747.GW3195@tamriel.snowman.net>
<8248.1578597145@sss.pgh.pa.us>
At Thu, 09 Jan 2020 14:12:25 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote in
> Stephen Frost <sfrost@snowman.net> writes:
> > I agree with all of that- but it seems like we've got people asking for
> > it, and I can understand why they are, and therefore I'd be inclined to
> > provide a way for users to get that behavior and I'm even inclined to
> > say that pushing down should be the 'default' if everything else is
> > equal and it's possible to do so.
>
> [ shrug... ] I think that's a completely arbitrary value judgment
> unsupported by any facts. Furthermore, it'd greatly expand our exposure
> to problems with "we thought this function behaves the same on the remote
> end, but it doesn't". That hazard makes me feel that the default should
> *never* be to encourage pushing down, unless there's a pretty clear
> potential win to justify the risk of breakage.
>
> If SQL/MED has a notion of a "foreign function" that is only executable on
> the remote side, and that fails if you try to execute it locally, then
> it'd make sense to implement that feature and then expect postgres_fdw to
> try hard to push down such calls. But we don't have that (yet). I'm
> unconvinced that ordinary functions ought to be treated as if remote
> execution is preferable.
Isn't ROUTING MAPPING [1] that? Definers should define one at their
own risk as table constraints are.
[1] https://www.postgresql.org/message-id/CAD21AoCSzZO%2Bd3EL-9w%3D97aC28%3DRb3%2BBh77wRLcP7HCH8-Bn9A%40...
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: horikyota.ntt@gmail.com, tgl@sss.pgh.pa.us, sfrost@snowman.net, shigeo.hirose@toshiba.co.jp
Subject: Re: How can I pushdown of functions used in targetlist with FDW ?
In-Reply-To: <20200110.100748.1958346513350741032.horikyota.ntt@gmail.com>
References: <3239.1578591103@sss.pgh.pa.us> <20200109184747.GW3195@tamriel.snowman.net> <8248.1578597145@sss.pgh.pa.us> <20200110.100748.1958346513350741032.horikyota.ntt@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox