Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eP2Y6-0003L5-8z for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Dec 2017 08:37:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eP2Y5-0007tL-1s for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Dec 2017 08:37:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eP2Y4-0007tB-ON for pgsql-hackers@lists.postgresql.org; Wed, 13 Dec 2017 08:37:52 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eP2Xv-0001Tr-3L for pgsql-hackers@postgresql.org; Wed, 13 Dec 2017 08:37:50 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id vBD8ba5t010076; Wed, 13 Dec 2017 17:37:36 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id E7FAB60294; Wed, 13 Dec 2017 17:37:35 +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 DB9BD5F590; Wed, 13 Dec 2017 17:37:35 +0900 (JST) Received: from [127.0.0.1] (unknown [129.60.241.61]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id D5ECD400B95; Wed, 13 Dec 2017 17:37:35 +0900 (JST) Subject: Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL References: <25058.1501077775@sss.pgh.pa.us> <8139.1501861816@sss.pgh.pa.us> <217ddce6-1b0f-509d-f8e0-5ddd9cad5d86@lab.ntt.co.jp> From: Amit Langote Message-ID: <107ccc78-1a10-ff59-e837-e5c99dc8c152@lab.ntt.co.jp> Date: Wed, 13 Dec 2017 17:37:25 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit To: Ali Akbar , Michael Paquier Cc: Tom Lane , tushar , PostgreSQL-development X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2017/12/13 15:59, Ali Akbar wrote: > 2017-12-13 9:10 GMT+07:00 Michael Paquier : > >> >> It is not the first time that this topic shows up. See for example >> this thread from myself's version of last year: >> https://www.postgresql.org/message-id/CAB7nPqTPXgX9HiyhhtAgpW7jbA1is >> kMCSoqXPEEB_KYXYy1E1Q@mail.gmail.com >> Or this one: >> http://www.postgresql.org/message-id/21633.1448383428@sss.pgh.pa.us >> >> And the conclusion is that we don't want to do what you are doing >> here, and that it would be better to store NOT NULL constraints in a >> way similar to CHECK constraints. >> > > Thanks for the link to those thread. > > Judging from the discussion there, it will be a long way to prevent DROP > NOT NULL. Yeah, I remembered that discussion when writing my email, but was for some reason convinced that everything's fine even without the elaborate book-keeping of inheritance information for NOT NULL constraints. Thanks Michael for reminding. Thanks, Amit