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 1eoee4-0002Sr-Ll for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Feb 2018 00:21:56 +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 1eoee3-0002GW-Bi for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Feb 2018 00:21:55 +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 1eoee3-0002GM-5i for pgsql-bugs@lists.postgresql.org; Thu, 22 Feb 2018 00:21:55 +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 1eoee0-0000sC-8I for pgsql-bugs@postgresql.org; Thu, 22 Feb 2018 00:21:54 +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 w1M0Lhon003992; Wed, 21 Feb 2018 19:21:43 -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: <20180221234943.xagxfgvjkrrs4c3o@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> <1695.1519256726@sss.pgh.pa.us> <20180221234943.xagxfgvjkrrs4c3o@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 21 Feb 2018 15:49:43 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3990.1519258903.1@sss.pgh.pa.us> Date: Wed, 21 Feb 2018 19:21:43 -0500 Message-ID: <3991.1519258903@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > Wonder if we should include a comment in the release notes that possible > occurances of the problem can be fixed with REFRESH? Yeah, I plan to. I forgot to mention it in the commit message, but I imagine it will still be fresh in mind when I make the release notes on Friday ;-) > I also wonder if there's a chance that this can result in wrong query > results without getting errors, once the xids appears to be from the > future - if so, should we ask people to refresh matviews if they're > older than pg_upgrade? I'm inclined to think that this is a rare problem, seeing that it's been there more than 5 years and we just now identified it. Probably, most people REFRESH their matviews often enough that there aren't really old rows in them. (It seems to me that REFRESH CONCURRENTLY does share part of the blame here, because it can allow older rows to linger in the matview.) I think it's sufficient to say "refresh if you see one of these errors". regards, tom lane