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 1gEEea-0007CD-It for pgsql-general@arkaria.postgresql.org; Sun, 21 Oct 2018 14:24:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gEEeY-0003NH-Aq for pgsql-general@arkaria.postgresql.org; Sun, 21 Oct 2018 14:24:26 +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.89) (envelope-from ) id 1gEEeY-0003N6-2q; Sun, 21 Oct 2018 14:24:26 +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 1gEEeR-0005Cs-3W; Sun, 21 Oct 2018 14:24:25 +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 w9LEOGIA003267; Sun, 21 Oct 2018 10:24:17 -0400 From: Tom Lane To: =?UTF-8?Q?Johannes_Gra=c3=abn?= cc: pgsql-general@postgresql.org, pgsql-hackers@lists.postgresql.org Subject: Re: found xmin x from before relfrozenxid y In-reply-to: <0662ea90-5249-4b8d-faa3-4abe4c88135a@selfnet.de> References: <0662ea90-5249-4b8d-faa3-4abe4c88135a@selfnet.de> Comments: In-reply-to =?UTF-8?Q?Johannes_Gra=c3=abn?= message dated "Sun, 21 Oct 2018 11:27:20 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3265.1540131856.1@sss.pgh.pa.us> Date: Sun, 21 Oct 2018 10:24:16 -0400 Message-ID: <3266.1540131856@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?UTF-8?Q?Johannes_Gra=c3=abn?= writes: > after upgrading to version 11, I see the error pattern "found xmin x > from before relfrozenxid y" in different databases on different hosts. > From https://www.postgresql.org/docs/10/static/release-10-3.html, I > learned that this was an error caused by pg_upgrade, which apparently > had been fixed in 10.3. This page also states that refreshing the > affected materialized view non-concurrently would fix the problem. > My question is now how to infer the affected materialized view from the > error message. Is there a way to tell which one to refresh from the xmin > or relfrozenxid value? No :-(. I wonder why in the world we didn't make that error message include the relation and block number the tuple was found in. (Well, I see the short answer: the code layer throwing the error doesn't know. But that could be fixed easily enough.) In the meantime, the only answer I can think of offhand is to manually do VACUUM FREEZE on each of your MVs, and then refresh anything that shows up with an error. regards, tom lane