Re: pgsql: Allow insert and update tuple routing and COPY for foreign table
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Simon Riggs <simon@2ndquadrant.com>, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Cc: Robert Haas <rhaas@postgresql.org>, pgsql-committers <pgsql-committers@lists.postgresql.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, ronan.dunklau@people-doc.com
Date: 2019-04-24T14:03:12Z
Lists: 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.etsuro@lab.ntt.co.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
Commits
-
Add FDW documentation notes about insert and update tuple routing and COPY.
- 53f48a2abb7b 11.3 landed
- 90fca7a35aa7 12.0 landed
-
Allow insert and update tuple routing and COPY for foreign tables.
- 3d956d9562aa 11.0 cited