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 56A9B9CB.90905@lab.ntt.co.jp
Whole thread Raw
In response to Re: Optimization for updating foreign tables in Postgres FDW  (Rushabh Lathia <rushabh.lathia@gmail.com>)
List pgsql-hackers
On 2016/01/28 15:20, Rushabh Lathia wrote:
> On Thu, Jan 28, 2016 at 11:33 AM, Etsuro Fujita
> <fujita.etsuro@lab.ntt.co.jp <mailto:fujita.etsuro@lab.ntt.co.jp>> wrote:
>
>     On 2016/01/27 21:23, Rushabh Lathia wrote:
>
>         If I understood correctly, above documentation means, that if
>         FDW have
>         DMLPushdown APIs that is enough. But in reality thats not the
>         case, we
>         need  ExecForeignInsert, ExecForeignUpdate, or ExecForeignDelete
>         in case
>         DML is not pushable.
>
>         And here fact is DMLPushdown APIs are optional for FDW, so that
>         if FDW
>         don't have DMLPushdown APIs they can still very well perform the DML
>         operations using ExecForeignInsert, ExecForeignUpdate, or
>         ExecForeignDelete.

>     I agree with you.  I guess I was wrong. sorry.
>
>         So documentation should be like:
>
>         If the IsForeignRelUpdatable pointer is set to NULL, foreign
>         tables are
>         assumed to be insertable, updatable, or deletable if the FDW
>         provides
>         ExecForeignInsert, ExecForeignUpdate, or ExecForeignDelete
>         respectively,
>
>         If FDW provides DMLPushdown APIs and the DML are pushable to the
>         foreign
>         server, then FDW still needs ExecForeignInsert,
>         ExecForeignUpdate, or
>         ExecForeignDelete for the non-pushable DML operation.
>
>         What's your opinion ?

>     I agree that we should add this to the documentation, too.
>
>     BTW, if I understand correctly, I think we should also modify
>     relation_is_updatabale() accordingly.  Am I right?

> Yep, we need to modify relation_is_updatable().

OK, will do.

Best regards,
Etsuro Fujita





pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: extend pgbench expressions with functions
Next
From: Etsuro Fujita
Date:
Subject: Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan