Re: pgsql: Allow insert and update tuple routing and COPY for foreign table

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, ronan(dot)dunklau(at)people-doc(dot)com
Subject: Re: pgsql: Allow insert and update tuple routing and COPY for foreign table
Date: 2019-04-24 14:03:12
Message-ID: 90573804dcad67f73552898ebfe9b399875a48bd.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, 2019-04-24 at 14:25 +0100, Simon Riggs wrote:
> On Wed, 24 Apr 2019 at 12:55, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>
> > > My point is that this should not be necessary.
> >
> > In my opinion, I think this is necessary...
>
> Could we decide by looking at what FDWs are known to exist?
> I hope we are trying to avoid breakage in the smallest number of FDWs.

A good idea. I don't volunteer to go through the list, but I had a look
at Multicorn, which is a FDW framework used by many FDWs, and it seems
to rely on multicornBeginForeignModify being called before
multicornExecForeignInsert (the former sets up a MulticornModifyState
used by the latter).

https://github.com/Kozea/Multicorn/blob/master/src/multicorn.c

Multicorn obviously hasn't got the message yet that the API has
changed in an incompatible fashion, so I'd argue that every
Multicorn FDW with write support is currently broken.

As Andres has argued above, it is too late to do anything more about
it than to document this and warn FDW authors as good as we can.

Yours,
Laurenz Albe

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-04-24 18:16:04 pgsql: Fix some minor postmaster-state-machine issues.
Previous Message Alvaro Herrera 2019-04-24 13:26:59 pgsql: Unify error messages

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-04-24 14:10:20 Re: finding changed blocks using WAL scanning
Previous Message Stephen Frost 2019-04-24 13:28:15 Re: block-level incremental backup