Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eESVA-0006hC-Tw for pgsql-committers@arkaria.postgresql.org; Tue, 14 Nov 2017 04:07:09 +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 1eESV9-0006YM-Qs for pgsql-committers@arkaria.postgresql.org; Tue, 14 Nov 2017 04:07:07 +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 1eESV9-0006Y9-9f; Tue, 14 Nov 2017 04:07:07 +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 1eESV6-0000JW-6w; Tue, 14 Nov 2017 04:07:06 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 86BED211AE; Mon, 13 Nov 2017 23:07:02 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Mon, 13 Nov 2017 23:07:02 -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=lowJhj+BAOrJxJQoIOBiOqMxBVSEL nJssQ6wRVQm48E=; b=DIy4EJ5wbMRpCq6qjAM5upRYSv+Rz4tZDHZFb1dM47MTd TmH/fn2d4NVesRKpuPZl9XdRTgc8faWLUm2Z9rn2XkC7qBizstPW/oB/SPcVtelu 3K/Ht0ftNUwTyr+6Qc0o080f0FvvXytuQxfGZbi/0VlBM6M75V16H0D/XD7oLc99 Se3G+ZXfK7aytbNDc4hiO5OjxUn5aawtOZZVV2W5xyRTgAl9m8ENLKCYcCpnHHr5 mofCfrp6+Bdr+67OiZN1P2jQtAgvUEhFmP+WtvrPiCTLhWTRJG7cJ4Lo3iCPb5Gw KCz9yt5Sgh/vQCHv1Rj6YbogIqcEe9zUdMwYU9wtg== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 1C92D240B2; Mon, 13 Nov 2017 23:07:02 -0500 (EST) Date: Mon, 13 Nov 2017 20:07:01 -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: <20171114040701.xu4ew2slpkl6tmct@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 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! Please note: I'd forgotten to git add the change to isolation_schedule re-activating the freeze-the-dead regression test. - Andres