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 1hIfWz-0002BH-Rw for pgsql-committers@arkaria.postgresql.org; Mon, 22 Apr 2019 20:27:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hIfWy-0007mS-9l for pgsql-committers@arkaria.postgresql.org; Mon, 22 Apr 2019 20:27:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIfWx-0007mG-4l; Mon, 22 Apr 2019 20:27:12 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIfWu-00006W-6v; Mon, 22 Apr 2019 20:27:10 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 54CF7210A8; Mon, 22 Apr 2019 16:27:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 22 Apr 2019 16:27:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=jcicff3QF9mvVpyc6hILzsvqWDX BBX9MCuVwLOHdheI=; b=FS0Cso1zBkzWJcHWov9B2BmYVzOtPzKej2iSwkpQCMF zIlQpNYmysDI25wHTpE5IPnMV/cM+Tbo68dHZnMaElPEKHKDB4Z6WQMo1jZ1iQJW jqxUBkmB4w3AJtnCJbrvY+V12nMVBC45dx68D7NU+n9NqUH2W4ykTpi1p1kqdgQG hP+i2T9ge3LmsmfUFoXX2sninCHP0AuzFmKQJzaJP5P2T5Qcb3XDfco5H/eFPmB3 xq6qIG4HEA+5iahFF7VBo802C4FRqY1aJsY5sTEk2SYSD5GNVhKDkfzWUcW5WRAl PSjVNbTloNXPjLA+eK6lrMdAIQz10Dwr5HbTavn9Yvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=jcicff 3QF9mvVpyc6hILzsvqWDXBBX9MCuVwLOHdheI=; b=6btj5bu0nyd/sYYRaYMnoL dBpaD+xboUM51e7Os3QYU/+fZusLIrjqUdQU5oOXC/c3Y+jEn2C4renC+aDyzkOI XIWgTRYm6e442Xc6V9URef1yEPC7dxpj+iMH7J5VvNOU7Ckb2Ox9tSYBEdZnTx9J Al/28rYgghPOn8eR/iD8ZznEtd5XQLb2tIXmv8g8AZ0gCLfqkYoRgl/aizWLhSUO PZ2KVn2xrYc7j5eirTEWzuaHow3No4+MFB5bagDItsCrydfdl7X2XfBwVzW+JwC9 wKnqUOZkw9uHl44yLuO+hFe4a6mQk27pn9uj98J8Lr2S5zRreH7sAtEOHJPk6C/A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrgeeigddugedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkpheple ekrddvuddtrddugedtrddujedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgv shesrghnrghrrgiivghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id E4C26E4122; Mon, 22 Apr 2019 16:27:04 -0400 (EDT) Date: Mon, 22 Apr 2019 13:27:03 -0700 From: Andres Freund To: Laurenz Albe Cc: Etsuro Fujita , Robert Haas , pgsql-committers@lists.postgresql.org, pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Allow insert and update tuple routing and COPY for foreign table Message-ID: <20190422202703.4mgtqv3mqtamsgel@alap3.anarazel.de> References: <5CBDB770.2060602@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-04-22 21:37:25 +0200, Laurenz Albe wrote: > Subject: [PATCH] Foreign table COPY FROM and tuple routing requires > BeginForeignInsert > > Commit 3d956d956a introduced support for foreign tables as partitions > and COPY FROM on foreign tables. > > If a foreign data wrapper supports data modifications, but either has > not adapted to this change yet or doesn't want to support it > for other reasons, it probably got broken by the above commit, > because COPY will just call ExecForeignInsert anyway, which might not > work because neither PlanForeignModify nor BeginForeignModify have > been called. > > To avoid breaking third-party foreign data wrappers in that way, allow > COPY FROM and tuple routing for foreign tables only if the foreign data > wrapper implements BeginForeignInsert. Isn't this worse though? Before this it's an API change between major versions. With this it's an API change in a *minor* version. Sure, it's one that doesn't crash, but it's still a pretty substantial function regression, no? Greetings, Andres Freund