Re: Optimization for updating foreign tables in Postgres FDW

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Optimization for updating foreign tables in Postgres FDW
Date: 2015-04-16 10:57:43
Message-ID: 552F95A7.4080302@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 16-04-2015 PM 07:50, Etsuro Fujita wrote:
>> The EXPLAIN output has also been improved as discussed in [1].
>
> I noticed that the EXPLAIN for a pushed-down update (delete) on inheritance
> childs doubly displays "Foreign Update" ("Foreign Delete"), one for
> ForeignScan and the other for ModifyTable. Here is an example:
>
> postgres=# explain verbose update parent set c1 = c1;
> QUERY PLAN
> ------------------------------------------------------------------------------
> Update on public.parent (cost=0.00..364.54 rows=4819 width=10)
> Update on public.parent
> Foreign Update on public.ft1
> Foreign Update on public.ft2
> -> Seq Scan on public.parent (cost=0.00..0.00 rows=1 width=10)
> Output: parent.c1, parent.ctid
> -> Foreign Update on public.ft1 (cost=100.00..182.27 rows=2409 width=10)
> Remote SQL: UPDATE public.t1 SET c1 = c1
> -> Foreign Update on public.ft2 (cost=100.00..182.27 rows=2409 width=10)
> Remote SQL: UPDATE public.t2 SET c1 = c1
> (10 rows)
>
> Should we do something? Suggestions are welcome.
>

From what I see in Tom's commit message[0] for FTI patch, this shouldn't be,
right?

To be specific, there should be "Foreign Scan" there as per the commit. Am I
missing something?

Thanks,
Amit

[1]
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=cb1ca4d800621dcae67ca6c799006de99fa4f0a5

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2015-04-16 11:40:39 Re: Optimization for updating foreign tables in Postgres FDW
Previous Message Etsuro Fujita 2015-04-16 10:50:03 Re: Optimization for updating foreign tables in Postgres FDW