Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePMOT-0008KT-7o for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Dec 2017 05:49:17 +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 1ePMOS-0003aB-HV for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Dec 2017 05:49:16 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ePMOS-0003a1-5L for pgsql-hackers@lists.postgresql.org; Thu, 14 Dec 2017 05:49:16 +0000 Received: from mail-it0-x244.google.com ([2607:f8b0:4001:c0b::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ePMOI-0002zU-9E for pgsql-hackers@postgresql.org; Thu, 14 Dec 2017 05:49:13 +0000 Received: by mail-it0-x244.google.com with SMTP id d16so8374191itj.1 for ; Wed, 13 Dec 2017 21:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wmXA1FTzN8+/1Ie4GD60amPuj2RM+afEr+GiWimcDxI=; b=aaVOw1moGbCWIHRHJGnLPQb2ehMqpKwntSQ0XvVT63ufbjzLQJa/c5nSL00MExYLze 887OfjJIMtjV1y+nBkc5M0T6kuVilyyb3RRo3tqRRHiTALjg8UcLxlK2LvPGajLp1ftl woP/v2NH/HacmMcTqHXezlSrY/khx2MgqxEsRDG9QjKzSkhz3wD2++Ds1l2BZp8J/7qC hxgjAEaOaaNFc+4aqCSvGDab54aJUlS/PR59j9tXyhg12Ksiqctzg3CbP3THZrq68O8R E9edm9imO31SOdKVW6gAJthwf0LwajZMJxRwqF3aAugg/phdZsxwQU02S1wL268cXFJg PDiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wmXA1FTzN8+/1Ie4GD60amPuj2RM+afEr+GiWimcDxI=; b=jaUCM5adJ5iweTBJ6jNpJYSzw2X5zFkWZAP6S4fFRi6DMlG0MzKZpoanaGtp4FoYNt 8nBx0DD06foNl16bJopHYVfY0DCwvnns7qbF3ak+K7riddp+pBq7o3vJkFvdzj84O9WZ KhLNy13Rx31o+BiLdgjQjqcuhYYtlU3RaUPVEgIPl+pcwlHB2620sQdOg0cwSbgT99hz qqXfScsg9ex1mnGBC4qDtsmEuVqGU0x+s726RmSIXTEEIb2wzwFwgRGs6kUhAP2f7j0H Y3xMeDh8b/7R0j2XSdes/FoXyRJtYQufvZj6kd+17Q9pxFx16LJaHej7x6Tx2W6sPgJu +jmw== X-Gm-Message-State: AKGB3mJmEvgpNC4eqOgWZp1P7Kr0G2YNS5oaFa/j4u1fs5R+urjQk8ne Ww16cOXbUDbmk5iCijWQfZLGFw== X-Google-Smtp-Source: ACJfBovrXzsfu1I/rdOGAW+rQfBOndozbmMBFlkwlXGGSkn1HYLQXT1jc6ivZyYJt4QS/HAi5TQ1Sg== X-Received: by 10.107.170.90 with SMTP id t87mr5739045ioe.253.1513230544029; Wed, 13 Dec 2017 21:49:04 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id e139sm2034733ite.8.2017.12.13.21.49.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Dec 2017 21:49:03 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id 263048010BF; Wed, 13 Dec 2017 23:49:02 -0600 (CST) Date: Wed, 13 Dec 2017 23:49:02 -0600 From: Justin Pryzby To: Ali Akbar Cc: Amit Langote , Michael Paquier , Tom Lane , tushar , PostgreSQL-development Subject: Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL Message-ID: <20171214054902.GC23527@telsasoft.com> References: <8139.1501861816@sss.pgh.pa.us> <217ddce6-1b0f-509d-f8e0-5ddd9cad5d86@lab.ntt.co.jp> <107ccc78-1a10-ff59-e837-e5c99dc8c152@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Dec 14, 2017 at 08:51:06AM +0700, Ali Akbar wrote: > 2017-12-13 15:37 GMT+07:00 Amit Langote : > > > On 2017/12/13 15:59, Ali Akbar wrote: > > > > > > 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. > > > > Patch for adding check in pg_upgrade. Going through git history, the check > for inconsistency in NOT NULL constraint has ben there since a long time > ago. In this patch the check will be applied for all old cluster version. > I'm not sure in which version was the release of table inheritance. Here are some spelling and grammar fixes to that patch: but nullabe in its children: nullable child column is not market: marked with adding: by adding and restart: and restarting the problem columns: the problematic columns 9.5, 9.6, 10: 9.5, 9.6, and 10 restore, that will cause error.: restore phase of pg_upgrade, that would cause an error. Justin