Re: Optimization for updating foreign tables in Postgres FDW - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: Optimization for updating foreign tables in Postgres FDW
Date
Msg-id 53DF6EE6.5090202@lab.ntt.co.jp
Whole thread Raw
In response to Re: Optimization for updating foreign tables in Postgres FDW  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Responses Re: Optimization for updating foreign tables in Postgres FDW
Re: Optimization for updating foreign tables in Postgres FDW
List 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.albe@wien.gv.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

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: How to manage shared library lifetime through C functions
Next
From: Etsuro Fujita
Date:
Subject: Re: Optimization for updating foreign tables in Postgres FDW