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 1gaD4c-0008IL-Ce for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Dec 2018 05:10:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gaD4a-00061M-EQ for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Dec 2018 05:10:08 +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 1gaD4a-00061F-8V for pgsql-bugs@lists.postgresql.org; Fri, 21 Dec 2018 05:10:08 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gaD4W-0005ef-88 for pgsql-bugs@lists.postgresql.org; Fri, 21 Dec 2018 05:10:07 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id wBL5A1qg011610; Fri, 21 Dec 2018 14:10:01 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 624A2EA756B; Fri, 21 Dec 2018 14:10:01 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 53087EA7B1B; Fri, 21 Dec 2018 14:10:01 +0900 (JST) Received: from [IPv6:::1] (unknown [129.60.241.75]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id 3C6D5400875; Fri, 21 Dec 2018 14:10:01 +0900 (JST) Message-ID: <5C1C75B2.9000008@lab.ntt.co.jp> Date: Fri, 21 Dec 2018 14:10:10 +0900 From: Etsuro Fujita User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 Subject: Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction References: <5C18ECBB.2000507@lab.ntt.co.jp> <3539e73a-313a-5406-27c7-850affb47921@lab.ntt.co.jp> <20181219023814.GA6577@paquier.xyz> <6daa6d4a-d4a9-bd2c-0b84-c4e31d2b9844@lab.ntt.co.jp> <5C19F7FF.9060904@lab.ntt.co.jp> <20181219083422.GA680@paquier.xyz> <5C1A0B6C.1040502@lab.ntt.co.jp> <20181220003140.GE27104@paquier.xyz> <5C1C62C5.8040409@lab.ntt.co.jp> <20181221040724.GF1886@paquier.xyz> In-Reply-To: <20181221040724.GF1886@paquier.xyz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Michael Paquier Cc: Amit Langote , Luis Carril , "pgsql-bugs@lists.postgresql.org" , PG Bug reporting form , Michael Paquier X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk (2018/12/21 13:07), Michael Paquier wrote: > On Fri, Dec 21, 2018 at 12:49:25PM +0900, Etsuro Fujita wrote: >> (2018/12/20 9:31), Michael Paquier wrote: >>> Attached is the patch with two new test cases blowing with wal_level = >>> minimal. On HEAD, I suggest that we use RELKIND_CAN_HAVE_STORAGE to not >>> fall again in this trap in the future. For back-branches, let's just >>> add the appropriate relkind checks as suggested upthread. >> >> To make maintenance easy, I think it might be better to add the appropriate >> relkind checks on HEAD as well. Other than that, the patch looks good to >> me. > > Well, using RELKIND_CAN_HAVE_STORAGE is exactly to ease future > maintenance so as we don't fall again into the same trap if a new > relkind which has no physical storage gets introduced if it supports > COPY FROM. So I would keep really it on HEAD. My point here is that if doing so, we would have 3 versions in PG10, PG11, and HEAD, which would make back-patching complicated. So my taste would be to fix this on HEAD the same way as PG11, but I'm not against using RELKIND_CAN_HAVE_STORAGE on HEAD. Best regards, Etsuro Fujita