Re: Optimization for updating foreign tables in Postgres FDW

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: Shigeru Hanada *EXTERN* <shigeru(dot)hanada(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Optimization for updating foreign tables in Postgres FDW
Date: 2014-08-04 11:30:46
Message-ID: 53DF6EE6.5090202@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2014/07/30 17:22), Etsuro Fujita wrote:
> (2014/07/29 0:58), Robert Haas wrote:
>> On Fri, Jul 25, 2014 at 3:39 AM, Albe Laurenz
>> <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
>>> Shigeru Hanada wrote:
>>>> * Naming of new behavior
>>>> You named this optimization "Direct Update", but I'm not sure that
>>>> this is intuitive enough to express this behavior. I would like to
>>>> hear opinions of native speakers.
>>>
>>> How about "batch foreign update" or "batch foreign modification"?
>>> (Disclaimer: I'm not a native speaker either.)
>>
>> I think direct update sounds pretty good. "Batch" does not sound as
>> good to me, since it doesn't clearly describe what makes this patch
>> special as opposed to some other grouping of updates that happens to
>> produce a speedup.
>
> I agree with Robert on that point.
>
>> Another term that might be used is "update pushdown", since we are
>> pushing the whole update to the remote server instead of having the
>> local server participate. Without looking at the patch, I don't have
>> a strong opinion on whether that's better than "direct update" in this
>> context.
>
> "Update Pushdown" is fine with me.
>
> If there are no objections of others, I'll change the name from "Direct
> Update" to "Update Pushdown".

Done. (I've left deparseDirectUpdateSql/deparseDirectDeleteSql as-is,
though.)

Other changes:

* Address the comments from Eitoku-san.
* Add regression tests.
* Fix a bug, which fails to show the actual row counts in EXPLAIN
ANALYZE for UPDATE/DELETE without a RETURNING clause.
* Rebase to HEAD.

Please find attached an updated version of the patch.

Thanks,

Best regards,
Etsuro Fujita

Attachment Content-Type Size
postgres_fdw-update-v2.patch text/x-diff 44.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2014-08-04 11:50:13 Re: Optimization for updating foreign tables in Postgres FDW
Previous Message Heikki Linnakangas 2014-08-04 10:58:04 Re: How to manage shared library lifetime through C functions