Re: inherit support for foreign tables

From: David Fetter <david(at)fetter(dot)org>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: inherit support for foreign tables
Date: 2014-12-06 17:02:16
Message-ID: 20141206170216.GA14211@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 04, 2014 at 12:35:54PM +0900, Etsuro Fujita wrote:
> (2014/12/03 19:35), Ashutosh Bapat wrote:
> >On Tue, Dec 2, 2014 at 8:29 AM, Etsuro Fujita
> ><fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp <mailto:fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>> wrote:
>
> >This is not exactly extension of non-inheritance case. non-inheritance
> >case doesn't show two remote SQLs under the same plan node. May be you
> >can rename the label Remote SQL as Remote UPDATE/INSERT/DELETE (or
> >something to that effect) for the DML command and the Foreign plan node
> >should be renamed to Foreign access node or something to indicate that
> >it does both the scan as well as DML. I am not keen about the actual
> >terminology, but I think a reader of plan shouldn't get confused.
> >
> >We can leave this for committer's judgement.
>
> Thanks for the proposal! I think that would be a good idea. But I think
> there would be another idea. An example will be shown below. We show the
> update commands below the ModifyTable node, not above the corresponding
> ForeignScan nodes, so maybe less confusing. If there are no objections of
> you and others, I'll update the patch this way.
>
> postgres=# explain verbose update parent set a = a * 2 where a = 5;
> QUERY PLAN
> -------------------------------------------------------------------------------------
> Update on public.parent (cost=0.00..280.77 rows=25 width=10)
> On public.ft1
> Remote SQL: UPDATE public.mytable_1 SET a = $2 WHERE ctid = $1
^^^^^^^^^^
It occurs to me that the command generated by the FDW might well not
be SQL at all, as is the case with file_fdw and anything else that
talks to a NoSQL engine.

Would it be reasonable to call this "Remote command" or something
similarly generic?

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2014-12-06 21:59:00 Re: excessive amounts of consumed memory (RSS), triggering OOM killer
Previous Message Stephen Frost 2014-12-06 16:50:39 Re: Role Attribute Bitmask Catalog Representation