Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eGral-0008Fh-Oo for pgsql-committers@arkaria.postgresql.org; Mon, 20 Nov 2017 19:18:51 +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 1eGral-0002jx-9e for pgsql-committers@arkaria.postgresql.org; Mon, 20 Nov 2017 19:18:51 +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 1eGral-0002ja-5A; Mon, 20 Nov 2017 19:18:51 +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 1eGrai-0007dw-AF; Mon, 20 Nov 2017 19:18:50 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1AA43213F5; Mon, 20 Nov 2017 14:18:47 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Mon, 20 Nov 2017 14:18:47 -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=YQ2TI2BqOi0ta7LTWQsifqZNEdM1d iiqwdglI2rANb0=; b=qAbTVgb3I1uj9cnRKTI+EEehRTmtFLHZxlAliMdxoiRFa e5AY+tKBSD8dN4hCJpmqRE+HN8QdHOj8JEj9hoxZ8CseGDhTtipE2Cf55PyL2/s0 VgKJg0ARh8gom08eZ7ewzXHpoAAY/yFXqhcO+DzqTQK4HRydEjR7vAo1DqTTFz62 oidsW87t4o/J9pAjVvBRdXFUFR0VdB4hb5wXdhffo68+MHBhrvEBiu57xKIRRp13 Zh7PgSEwdV0BgkyVghzNkan8Igfh2daEanQJvBOPQpttRGQmY+HleuLM4R9Jjiz9 tx8pV7dzEb/dvvB5M709RJkR7PNfAaTdEdHX704NA== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.189]) by mail.messagingengine.com (Postfix) with ESMTPA id BB5702473E; Mon, 20 Nov 2017 14:18:46 -0500 (EST) Date: Mon, 20 Nov 2017 11:18:45 -0800 From: Andres Freund To: Alvaro Herrera Cc: "Wood, Dan" , Peter Geoghegan , pgsql-committers@postgresql.org, "Wong, Yi Wen" , Michael Paquier , Robert Haas , Tom Lane , pgsql-hackers@postgresql.org Subject: Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple Message-ID: <20171120191845.plwi3mregv5xzo7y@alap3.anarazel.de> References: <20171102112019.33wb7g5wp4zpjelu@alap3.anarazel.de> <20171102124947.hshl7znx6ixy62pf@alvherre.pgsql> <20171102130551.i2w33sqdw3bdvetn@alap3.anarazel.de> <20171103145330.5ycjoje5s6lfwxps@alap3.anarazel.de> <20171114030341.movhteyakqeqx5pm@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171114030341.movhteyakqeqx5pm@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2017-11-13 19:03:41 -0800, Andres Freund wrote: > Hi, > > On 2017-11-03 07:53:30 -0700, Andres Freund wrote: > > Here's that patch. I've stared at this some, and Robert did too. Robert > > mentioned that the commit message might need some polish and I'm not > > 100% sure about the error message texts yet. > > > > I'm not yet convinced that the new elog in vacuumlazy can never trigger > > - but I also don't think we want to actually freeze the tuple in that > > case. > > I'm fairly sure it could be triggered, therefore I've rewritten that. > > I've played around quite some with the attached patch. So far, after > applying the second patch, neither VACUUM nor VACUUM FULL / CLUSTER make > the situation worse for already existing corruption. HOT pruning can > change the exact appearance of existing corruption a bit, but I don't > think it can make the corruption meaningfully worse. It's a bit > annoying and scary to add so many checks to backbranches but it kinda > seems required. The error message texts aren't perfect, but these are > "should never be hit" type elog()s so I'm not too worried about that. > > > Please review! Ping? Alvaro, it'd be good to get some input here. - Andres