Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCxZQ-0001Ky-6m for pgsql-committers@arkaria.postgresql.org; Fri, 10 Nov 2017 00:53:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eCxZP-00031h-Pq for pgsql-committers@arkaria.postgresql.org; Fri, 10 Nov 2017 00:53:19 +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 1eCxZP-00030t-0E; Fri, 10 Nov 2017 00:53:19 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eCxZI-00077n-EO; Fri, 10 Nov 2017 00:53:18 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C91152100F; Thu, 9 Nov 2017 19:53:10 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 09 Nov 2017 19:53:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=wMGv70/CyZL2j/uxfMnRiHw2KMzPk mOq9+Y4LlNeZYo=; b=DI36XYeJwpar7+mQHyT2BnMt2yxK2dY/CjHEzWF5oVQrp ElDpIVnLBplk/U2NyCEZ53LkZI5QuEsMirvo/iluAGkyWT25Z0pwBIwfYyekzFQN W2V0TNvFOt4OTiP21kt6Tswe2ySdG7WPZCIsMLnkH4VW8ALlcl9s7z4A8AmUttgl 25ZE8Jz0GNmv13magIPVqZUFuLVwx+3dv6y9l9Gn/b8T4WiXfcd7PqJWMCxIrGyc 2cbxIEbMEx7b0xdpGsji9uvL4yADqff09iwDMtVmJU7D3W0DK9/A30xzJ4VMY75m eKO4mG3qWQoFWbMKpd0kdoSPBqHaf567CWpCtTYsQ== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 8A881240A4; Thu, 9 Nov 2017 19:53:10 -0500 (EST) Date: Thu, 9 Nov 2017 16:53:09 -0800 From: Andres Freund To: Peter Geoghegan Cc: Alvaro Herrera , "Wood, Dan" , pgsql-committers , "Wong, Yi Wen" , Michael Paquier , Robert Haas , Tom Lane , PostgreSQL Hackers Subject: Re: [HACKERS] pgsql: Fix freezing of a dead HOT-updated tuple Message-ID: <20171110005309.ectyi5z6fwqjgpfl@alap3.anarazel.de> References: <20171102112019.33wb7g5wp4zpjelu@alap3.anarazel.de> <20171102124947.hshl7znx6ixy62pf@alvherre.pgsql> <20171102130551.i2w33sqdw3bdvetn@alap3.anarazel.de> <20171103145330.5ycjoje5s6lfwxps@alap3.anarazel.de> <20171103193659.GA3404@marmot> <20171104131500.w7enyo7olxk7ygca@alap3.anarazel.de> <20171109222431.qwj6dtl5chumc6lt@alap3.anarazel.de> <20171110001718.rpgx4lf6xxi4ge3l@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 2017-11-09 16:45:07 -0800, Peter Geoghegan wrote: > On Thu, Nov 9, 2017 at 4:17 PM, Andres Freund wrote: > >> Actually, on second thought, I take that back -- I don't think that > >> REINDEXing will even finish once a HOT chain is broken by the bug. > >> IndexBuildHeapScan() actually does quite a good job of making sure > >> that HOT chains are sane, which is how the enhanced amcheck notices > >> the bug here in practice. > > > > I think that's too optimistic. > > Why? Because the "find the TID of the root" logic in > IndexBuildHeapScan()/heap_get_root_tuples() won't reliably find the > actual root (it might be some other HOT chain root following TID > recycling by VACUUM)? Primarily because it's not an anti-corruption tool. I'd be surprised if there weren't ways to corrupt the page using these corruptions that aren't detected by it. But even if it were, I don't think there's enough information to do so in the general case. You very well can end up with pages where subsequent hot pruning has removed a good bit of the direct evidence of this bug. But I'm not really sure why the error detection capabilities of matter much for the principal point I raised, which is how much work we need to do to not further worsen the corruption. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers