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 1gEQWE-00046r-82 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Oct 2018 03:04:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gEQWA-0008FV-4d for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Oct 2018 03:04:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gEQW9-0008FO-Kf for pgsql-hackers@lists.postgresql.org; Mon, 22 Oct 2018 03:04:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gEQW7-00047n-2K for pgsql-hackers@lists.postgresql.org; Mon, 22 Oct 2018 03:04:32 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w9M34QlC004798; Sun, 21 Oct 2018 23:04:26 -0400 From: Tom Lane To: Andres Freund cc: Johannes =?utf-8?B?R3Jhw6tu?= , pgsql-hackers@lists.postgresql.org Subject: Re: found xmin x from before relfrozenxid y In-reply-to: <20181022010105.v4wzvjhpqhmlz2zu@alap3.anarazel.de> References: <0662ea90-5249-4b8d-faa3-4abe4c88135a@selfnet.de> <3266.1540131856@sss.pgh.pa.us> <20181022010105.v4wzvjhpqhmlz2zu@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sun, 21 Oct 2018 18:01:05 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <82488.1540177466.1@sss.pgh.pa.us> Date: Sun, 21 Oct 2018 23:04:26 -0400 Message-ID: <82489.1540177466@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-10-21 10:24:16 -0400, Tom Lane wrote: >> (Well, I see the short answer: the code layer throwing the error >> doesn't know. But that could be fixed easily enough.) > I wonder if the better approach wouldn't be to add an errcontext for > vaccuum, where continually update the block number etc. Theres plenty of > different sources of corruption that'd potentially cause debug messages > or errors, and that should get most of them. I did not chase this in detail, but it looked to me like there were two code paths leading to heap_prepare_freeze_tuple, and only one of them came from VACUUM. So adding a Relation parameter seemed like a more promising fix for it. But possibly there are more error messages we need to worry about besides this. regards, tom lane