Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAifF-0006dW-U4 for pgsql-committers@arkaria.postgresql.org; Fri, 03 Nov 2017 20:34:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eAifF-0001hk-Gc for pgsql-committers@arkaria.postgresql.org; Fri, 03 Nov 2017 20:34:05 +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 1eAifD-0001cA-Th; Fri, 03 Nov 2017 20:34:04 +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 1eAifA-0005xD-VB; Fri, 03 Nov 2017 20:34:02 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1A9A82116B; Fri, 3 Nov 2017 16:33:59 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Fri, 03 Nov 2017 16:33:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=iFljvW QHsxQu+ycNb8RbpsoyQfi2jFM+0gX/VOT+xPw=; b=lYjnvQe8NLh2vCZ6sy6lKu QLvSgtC5QJSCguM1irzV1qCZ948W4rB3RrP//yt3dHnCvSh9QRNH0pE+2BhJu3o4 FF7DxIfxB2fKj84S4yuT2o4QSlii2P7b9bVI7hPQ/jdFt3FJYCgCUFhdSkJI9gkj IRYa9A31X8Cb9yPGggU1yqF+07MDGiHTBUB3ymI9SuXupkeAU+V8sh/Q68izDQ2m JRs6WmibgStDIDcwPmpoNU03hb/WUE2LPflqYPvmBXcbcSNmFsaUmo75vvj3oN7i GrDPcx8M469yBS3FtmYrsVLUhyfSlZn9b4KckrNcbPFSUvmmJs4zsgV0mGpK2j3A == X-ME-Sender: Received: from [100.91.83.127] (unknown [172.56.13.243]) by mail.messagingengine.com (Postfix) with ESMTPA id 0411A7FAE3; Fri, 3 Nov 2017 16:33:52 -0400 (EDT) Date: Sat, 04 Nov 2017 02:03:45 +0530 User-Agent: K-9 Mail for Android In-Reply-To: <20171103195204.omoi4olywmv3nyqk@alvherre.pgsql> References: <20171103195204.omoi4olywmv3nyqk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [HACKERS] pgsql: Fix freezing of a dead HOT-updated tuple To: Alvaro Herrera ,Peter Geoghegan CC: "Wood, Dan" ,pgsql-committers@postgresql.org,"Wong, Yi Wen" ,Michael Paquier ,Robert Haas ,Tom Lane ,pgsql-hackers@postgresql.org From: Andres Freund Message-ID: <698409B0-5E70-4F88-A07B-7460C674874B@anarazel.de> 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 On November 4, 2017 1:22:04 AM GMT+05:30, Alvaro Herrera wrote: >Peter Geoghegan wrote: >> Andres Freund wrote: > >> > Staring at the vacuumlazy hunk I think I might have found a related >bug: >> > heap_update_tuple() just copies the old xmax to the new tuple's >xmax if >> > a multixact and still running. It does so without verifying >liveliness >> > of members. Isn't that buggy? Consider what happens if we have >three >> > blocks: 1 has free space, two is being vacuumed and is locked, >three is >> > full and has a tuple that's key share locked by a live tuple and is >> > updated by a dead xmax from before the xmin horizon. In that case >afaict >> > the multi will be copied from the third page to the first one.=20 >Which is >> > quite bad, because vacuum already processed it, and we'll set >> > relfrozenxid accordingly. I hope I'm missing something here? >>=20 >> Can you be more specific about what you mean here? I think that I >> understand where you're going with this, but I'm not sure. > >He means that the tuple that heap_update moves to page 1 (which will no >longer be processed by vacuum) will contain a multixact that's older >than relminmxid -- because it is copied unchanged by heap_update >instead >of properly checking against age limit. Right. That, or a member xid below relminxid. I think both scenarios are po= ssible. Andres --=20 Sent from my Android device with K-9 Mail. Please excuse my brevity. --=20 Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers