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 1gZRyJ-00030H-1g for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Dec 2018 02:52:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZRyG-0008Lk-M6 for pgsql-bugs@arkaria.postgresql.org; Wed, 19 Dec 2018 02:52:28 +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 1gZRyG-0008Ld-CX for pgsql-bugs@lists.postgresql.org; Wed, 19 Dec 2018 02:52:28 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZRyC-0005tA-Co for pgsql-bugs@lists.postgresql.org; Wed, 19 Dec 2018 02:52:26 +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 wBJ2qLUh029610; Wed, 19 Dec 2018 11:52:21 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 719BCEA7B07; Wed, 19 Dec 2018 11:52:21 +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 66DA6EA781E; Wed, 19 Dec 2018 11:52:21 +0900 (JST) Received: from [127.0.0.1] (unknown [129.60.241.61]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id 5E1974005E1; Wed, 19 Dec 2018 11:52:21 +0900 (JST) Subject: Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction References: <15552-c64aa14c5c22f63c@postgresql.org> <8e82d10d-cc16-eed4-7634-3654f59d8053@lab.ntt.co.jp> <30718b48-8020-329a-c6f0-74e1222e5283@lab.ntt.co.jp> <5C18ECBB.2000507@lab.ntt.co.jp> <3539e73a-313a-5406-27c7-850affb47921@lab.ntt.co.jp> <20181219023814.GA6577@paquier.xyz> From: Amit Langote Message-ID: <6daa6d4a-d4a9-bd2c-0b84-c4e31d2b9844@lab.ntt.co.jp> Date: Wed, 19 Dec 2018 11:52:09 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <20181219023814.GA6577@paquier.xyz> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Michael Paquier Cc: Luis Carril , Etsuro Fujita , "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 On 2018/12/19 11:38, Michael Paquier wrote: > On Wed, Dec 19, 2018 at 10:19:58AM +0900, Amit Langote wrote: >> Not sure that's a good name to give to the test file, although since I'm >> not greatly enthusiastic about adding a TAP test for this, I don't have a >> good suggestion. Maybe, choose a more generic name? Michael, any >> suggestions? > > I have looked at the proposal seriously myself, and adding a TAP test > for that edge case is overdoing it. So why not just adding a test to > postgres_fdw.sql? The failure can be triggered with installcheck and > wal_level =3D minimal. Not everybody tests with non-default options, but > some of us do. Yeah, I said that upthread. > Attached is a more simple, updated, patch which adds a new test and a > comment. I would rather not play with the semantics of heap_sync() on > the back branches as well as on a thread dealing with a bug about COPY > with foreign tables. Such discussions deserve a larger audience on > -hackers. +1 Patch looks good, by the way. > it is a bit funny to see COPY FREEZE working for foreign tables > actually, but perhaps this has some use-cases for some FDWs, so I'd > rather not touch it. Hmm, note that we don't pass CopyState->freeze option to the FDW drivers today, though we may in the future when we add an *actual* COPY interface to FDWs. Wouldn't it be a good idea to prevent specifying the FREEZE option for foreign tables as COPY targets until then? Of course, that's something for -hackers to consider. Thanks, Amit