Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eoe4y-0000eH-Ag for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Feb 2018 23:45:40 +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 1eoe4x-000612-6C for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Feb 2018 23:45:39 +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 1eoe4x-00060s-0E for pgsql-bugs@lists.postgresql.org; Wed, 21 Feb 2018 23:45:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eoe4p-00007L-MI for pgsql-bugs@postgresql.org; Wed, 21 Feb 2018 23:45:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w1LNjQgM001696; Wed, 21 Feb 2018 18:45:26 -0500 From: Tom Lane To: Andres Freund cc: Victor Yegorov , Claudio Freire , pgsql-bugs@postgresql.org Subject: Re: pg_upgrade and materialized views In-reply-to: <20180221173344.wjp4r6lxhcm35pzv@alap3.anarazel.de> References: <23575.1519162064@sss.pgh.pa.us> <24838.1519163208@sss.pgh.pa.us> <8092.1519225692@sss.pgh.pa.us> <20180221173344.wjp4r6lxhcm35pzv@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 21 Feb 2018 09:33:44 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1694.1519256726.1@sss.pgh.pa.us> Date: Wed, 21 Feb 2018 18:45:26 -0500 Message-ID: <1695.1519256726@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-02-21 10:08:12 -0500, Tom Lane wrote: >> Yeah, that does look suspiciously like a set of facts matching this >> problem :-( > I'd personally say ;), given that it's one less potentially data > corrupting bug to worry about ;). And it's one that can be fixed without > dataloss to boot. I've pushed a fix for this. I concluded after further study that there wasn't really much call for a unified notion of applicable relkinds, because actually what this code is dealing with is "relkinds that need preservation of dropped columns" and "relkinds that need preservation of relfrozenxid", both of which are somewhat different from "relkinds that have storage". What's really lacking is documentation, which I attempted to supply. For the code change proper, I did what you suggested and split the relfrozenxid hacking into an independent if-block. regards, tom lane