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 1hCH4o-0001eh-Lb for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Apr 2019 05:07:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hCH4n-0008DS-C9 for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Apr 2019 05:07:41 +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 1hCH4n-0008D9-36 for pgsql-bugs@lists.postgresql.org; Fri, 05 Apr 2019 05:07:41 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hCH4i-0007qY-Fd for pgsql-bugs@lists.postgresql.org; Fri, 05 Apr 2019 05:07:39 +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 x3557XAc022444; Fri, 5 Apr 2019 14:07:33 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id C2FCBEA7C00; Fri, 5 Apr 2019 14:07:33 +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 B8135EA7BBC; Fri, 5 Apr 2019 14:07:33 +0900 (JST) Received: from [127.0.0.1] (unknown [129.60.241.61]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id A7E46400802; Fri, 5 Apr 2019 14:07:33 +0900 (JST) Subject: Re: BUG #15733: An insert destined at partition created after a column has been dropped from the parent table fails From: Amit Langote References: <15733-7692379e310b80ec@postgresql.org> <20190404013510.GB7693@paquier.xyz> <20190404104818.GM7693@paquier.xyz> <2e86bcd1-1196-d8bf-ed39-b43f66802e4f@lab.ntt.co.jp> Message-ID: <1b1a2522-4edc-9eea-9883-a41c68eba1ba@lab.ntt.co.jp> Date: Fri, 5 Apr 2019 14:07:22 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <2e86bcd1-1196-d8bf-ed39-b43f66802e4f@lab.ntt.co.jp> Content-Type: multipart/mixed; boundary="------------A6074BA00E8C8E1C2769AF4E" Content-Language: en-US X-CC-Mail-RelayStamp: 1 To: Michael Paquier Cc: petr.fedorov@phystech.edu, pgsql-bugs@lists.postgresql.org X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------A6074BA00E8C8E1C2769AF4E Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 2019/04/05 12:22, Amit Langote wrote: > On 2019/04/04 19:48, Michael Paquier wrote: >> Perhaps it would make sense to have this test case on HEAD as well? > > OK, I've divided the patch that adds tests into its own. > >> It seems to me that there is little point in having a completely new >> set of relations to test this issue knowing that multi-level >> partitioning is already tested in the same file. Why not extending >> the part close to "more tests for certain multi-level partitioning >> scenarios" in insert.sql with a mlparted111 or such a thing? This >> way, we have a three-layer partitioning and the error can be equally >> triggered. > > Done that way. > > v2-0001_*, the test patch, can be applied to HEAD and PG 11 branches. Of > course, one would want to commit 0001 and 0002 together in PG 11, because > you'll see the ERROR in the output in patch 0001, which is same as the > reported error. > > I've also modified 0001 so that it can be applied to PG 10, attached as > pg10-0001*. > > Both HEAD and PG 10 don't need any code changes. I said v2-0001 could be applied unchanged to both HEAD and PG 11, but I was wrong. Tests without the code changes fail on PG 11, but they pass on both PG 10 and HEAD as there's no bug in those branches. Here are revised patches. pg10-v3-0001 adds tests in PG 10 branch pg11-v3-0001 adds tests in PG 11 branch t(tests fail which 0002 fixes) pg11-v3-0002 fixes bug in PG 11 branch HEAD-v3-0001 adds tests in HEAD branch I also rewrote tests a bit too, expanding the comment, and finding even more suitable place in insert.sql to add this test than v2. Thanks, Amit --------------A6074BA00E8C8E1C2769AF4E Content-Type: text/plain; charset=UTF-8; name="HEAD-v3-0001-Add-tests-for-a-fix-for-BUG-15733.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="HEAD-v3-0001-Add-tests-for-a-fix-for-BUG-15733.patch"