Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eN2cs-0001OF-Tj for pgsql-committers@arkaria.postgresql.org; Thu, 07 Dec 2017 20:18:35 +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 1eN2cr-0004e1-UL for pgsql-committers@arkaria.postgresql.org; Thu, 07 Dec 2017 20:18:33 +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 1eN2bc-0000wD-IY; Thu, 07 Dec 2017 20:17:17 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eN2bV-0004eF-St; Thu, 07 Dec 2017 20:17:15 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5847B20D2D; Thu, 7 Dec 2017 15:17:08 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Thu, 07 Dec 2017 15:17:08 -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=2KjpUIvP6o/iNi0D0j8X2OuoGLWW4 Rt8KmGOTMuCwIo=; b=M+d9nY8ZPxWMD4px1m3Moo4/n5+RYqSuqhldNDXlty7Th VYWykB/B+ROnctgsdK6iS4aYYsUZQrDwUZajV7TWmM4VzURo0HsWljj3/vXNhhhi APb05GHXaZj8WU8jg/3xAT6ggnBrYVSANC/muEraOaaTrqJR4m6QWjmNEJO6g6WB CAl6QQ+DFbNVSpO6CWhbRPu8TEJzwY8KxaSTsC16zqB7LppLPrzt7jAlDFhvtx6c i1FnllqElNPj5mCx6ZvNj7rJC9KuHu0UqsNDyU9gqGMU5IHrZPHKbekhoLvi0mv2 YLMdet5XayB/lY8a/T5lvt/ISB7QFIaGwszKohwPw== X-ME-Sender: Received: from intern.anarazel.de (unknown [172.56.42.37]) by mail.messagingengine.com (Postfix) with ESMTPA id BD5DA7E4AA; Thu, 7 Dec 2017 15:17:07 -0500 (EST) Date: Thu, 7 Dec 2017 12:17:06 -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: <20171207201706.fooygpgvlvfeas2t@alap3.anarazel.de> References: <20171114030341.movhteyakqeqx5pm@alap3.anarazel.de> <20171206162115.kdsd2fnipyswonir@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171206162115.kdsd2fnipyswonir@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2017-12-06 13:21:15 -0300, Alvaro Herrera wrote: > I think you've done a stellar job of identifying what the actual problem > was. I like the new (simpler) coding of that portion of > HeapTupleSatisfiesVacuum. Thanks! > freeze-the-dead is not listed in isolation_schedule; an easy fix. Yea, I'd sent an update about that, stupidly forgot git amend the commit... > I confirm that the test crashes with an assertion failure without the > code fix, and that it doesn't with it. > > I think the comparison to OldestXmin should be reversed: > > if (!TransactionIdPrecedes(xmax, OldestXmin)) > return HEAPTUPLE_RECENTLY_DEAD; > > return HEAPTUPLE_DEAD; > > This way, an xmax that has exactly the OldestXmin value will return > RECENTLY_DEAD rather DEAD, which seems reasonable to me (since > OldestXmin value itself is supposed to be still possibly visible to > somebody). Yes, I think you're right. That's a bug. > Your commit message does a poor job of acknowledging prior work on > diagnosing the problem starting from Dan's initial test case and patch. Yea, you're right. I was writing it with 14h of jetlag, apparently that does something to your brain... Greetings, Andres Freund