Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJIUk-0008I6-Au for pgsql-committers@arkaria.postgresql.org; Wed, 24 Apr 2019 14:03:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hJIUi-0001BT-OJ for pgsql-committers@arkaria.postgresql.org; Wed, 24 Apr 2019 14:03:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJIUi-00019v-GL; Wed, 24 Apr 2019 14:03:28 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJIUf-0000Fv-6k; Wed, 24 Apr 2019 14:03:28 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 9EA8C4DE51; Wed, 24 Apr 2019 16:03:23 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id 1IF3A9dcQfDZ; Wed, 24 Apr 2019 16:03:14 +0200 (CEST) Message-ID: <90573804dcad67f73552898ebfe9b399875a48bd.camel@cybertec.at> Subject: Re: pgsql: Allow insert and update tuple routing and COPY for foreign table From: Laurenz Albe To: Simon Riggs , Etsuro Fujita Cc: Robert Haas , pgsql-committers , PostgreSQL Hackers , ronan.dunklau@people-doc.com Date: Wed, 24 Apr 2019 16:03:12 +0200 In-Reply-To: References: <5CBDB770.2060602@lab.ntt.co.jp> <5CC04E72.90405@lab.ntt.co.jp> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 2019-04-24 at 14:25 +0100, Simon Riggs wrote: > On Wed, 24 Apr 2019 at 12:55, Etsuro Fujita 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