Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAFCS-00071V-Qx for pgsql-committers@arkaria.postgresql.org; Thu, 02 Nov 2017 13:06:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eAFCR-0003s8-CG for pgsql-committers@arkaria.postgresql.org; Thu, 02 Nov 2017 13:06:23 +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 1eAFCB-00031A-5C; Thu, 02 Nov 2017 13:06: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.84_2) (envelope-from ) id 1eAFBz-0007Mw-Ux; Thu, 02 Nov 2017 13:06:05 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 970F620B75; Thu, 2 Nov 2017 09:05:54 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 02 Nov 2017 09:05:54 -0400 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=Q7zViVWUz6HlUqaOOLWmqGcTKycBa ZzNw16WF6c1AkY=; b=iTiQ/SyhjkqivkM4lzsJ815Xv9rGVa5kpSmqU7oRjPMEA 5PVSshEpKITD+sV/jLzUZuCq8/X/6iCjr2v3eO6OBFPQc/jGxVR5gyR8IoP629If REjh/FEv4A9k3TMiTbyvjR60/Etqm0WozDUpPKbhK434v7+feRFmWVOjoeDOq+nM Apxc6nDtYTqd8LhtjTbtIaM0eL7pf99XQfQT4GRWiEHIBXyyR3Ows1lZGPMhs23d KbPCxEPfWV9bMqA3VNIog+T8NsM0Fyzib//xyKVWR+75LyrpuH593JneqzBql7Se apG77u1m2jZZlzM83YdteV5lVgLZ9IMdVHNbyfgqQ== X-ME-Sender: Received: from intern.anarazel.de (unknown [114.143.230.4]) by mail.messagingengine.com (Postfix) with ESMTPA id 2B4AB24F06; Thu, 2 Nov 2017 09:05:54 -0400 (EDT) Date: Thu, 2 Nov 2017 06:05:51 -0700 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] pgsql: Fix freezing of a dead HOT-updated tuple Message-ID: <20171102130551.i2w33sqdw3bdvetn@alap3.anarazel.de> References: <20171102112019.33wb7g5wp4zpjelu@alap3.anarazel.de> <20171102124947.hshl7znx6ixy62pf@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171102124947.hshl7znx6ixy62pf@alvherre.pgsql> 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 Hi, On 2017-11-02 13:49:47 +0100, Alvaro Herrera wrote: > Andres Freund wrote: > > I think the problem is on the pruning, rather than the freezing side. We > > can't freeze a tuple if it has an alive predecessor - rather than > > weakining this, we should be fixing the pruning to not have the alive > > predecessor. > > I gave a look at HTSV back then, but I didn't find what the right tweak > was, but then I only tried changing the return value to DEAD and > DELETE_IN_PROGRESS; the thought of selecting DEAD or RECENTLY_DEAD based > on OldestXmin didn't occur to me ... I was thinking that the fact that > there were live lockers meant that the tuple could not be removed, > obviously failing to notice that the subsequent versions of the tuple > would be good enough. I'll try to write up a commit based on that idea. I think there's some comment work needed too, Robert and I were both confused by a few things. I'm unfortunately travelling atm - it's evening here, and I'll flying back to the US all Saturday. I'm fairly sure I'll be able to come up with a decent patch tomorrow, but I'll need review and testing by others. > > If the update xmin is actually below the cutoff we can remove the tuple > > even if there's live lockers - the lockers will also be present in the > > newer version of the tuple. I verified that for me that fixes the > > problem. Obviously that'd require some comment work and more careful > > diagnosis. > > Sounds good. > > I'll revert those commits then, keeping the test, and then you can > commit your change. OK? Generally that sounds good - but you can't keep the testcase in without the new fix - the buildfarm would immediately turn red. I guess the best thing would be to temporarily remove it from the schedule? Do we care about people upgrading to unreleased versions? We could do nothing, document it in the release notes, or ??? 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