Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMUfv-000780-O7 for pgsql-committers@arkaria.postgresql.org; Wed, 06 Dec 2017 08:03:27 +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 1eMUfu-0001y5-Oh for pgsql-committers@arkaria.postgresql.org; Wed, 06 Dec 2017 08:03:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eMUfu-0001xl-9S; Wed, 06 Dec 2017 08:03:26 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eMUfq-0008N9-CG; Wed, 06 Dec 2017 08:03:25 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B978720D89; Wed, 6 Dec 2017 03:03:20 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Wed, 06 Dec 2017 03:03:20 -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=l4qHjCD7xcUZ7RNKit+zOcyWSbImH budqnfElp8XiOM=; b=HEBpCR3EDf8C5d85qMjx82LJiOAhOZGM9pH27BQGCBQ2S GBJmyHu+Z6vA827GPNWfUs0Vhkc4ymxHOEVfQoryIBXCobU9Mv/FPMpYa3ZJ0vXW hEu9Wc5I1UBmuDQiZwmeHT23B3FjeojGbH+PmndTZ7DpGoaJwPusaM4xUU/JijQH 6ZdXEOPn9ZYJTPresdEeWekLSkSVkvhxCvknHWBjIcTDtgQ6TeUOvYHHyScXQHzW FYK15MnyS9bPcrZPjij/egAivIy1OzhL3lRH6CHLurF4mfTw58t5S6Bdyp5Tmdpu SvCMoWf/yjTb40nEpU4J7K2hyDEL/Cc6n22YGhhZA== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 39A747E26F; Wed, 6 Dec 2017 03:03:20 -0500 (EST) Date: Wed, 6 Dec 2017 00:03:19 -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: <20171206080319.v7of3p45yvapkgla@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> <20171120191845.plwi3mregv5xzo7y@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171120191845.plwi3mregv5xzo7y@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2017-11-20 11:18:45 -0800, Andres Freund wrote: > 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. Ping. I'm a bit surprised that a bug fixing a significant data corruption issue has gotten no reviews at all. Greetings, Andres Freund