Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAhmP-00081G-5P for pgsql-committers@arkaria.postgresql.org; Fri, 03 Nov 2017 19:37: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 1eAhmO-0005PM-Km for pgsql-committers@arkaria.postgresql.org; Fri, 03 Nov 2017 19:37:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eAhm8-0004KL-UH for pgsql-committers@postgresql.org; Fri, 03 Nov 2017 19:37:08 +0000 Received: from mail-pg0-x235.google.com ([2607:f8b0:400e:c05::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eAhm5-0006dJ-6h for pgsql-committers@postgresql.org; Fri, 03 Nov 2017 19:37:08 +0000 Received: by mail-pg0-x235.google.com with SMTP id y5so3300723pgq.7 for ; Fri, 03 Nov 2017 12:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bowt-ie.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2bXrgqz8+4O90scVR4hpEhzhh7+xCxG2uSN4PwMReKc=; b=ZjwbtMxyD/B/G/R47WDOYsDOpIPQF7xJS8uvfeYhtB7wZhG9CNPtQiyw/UmhHHqQi2 I2wQzlCGvvGYR6J88drAnuHJi15ofTDxNlGXS7t1BXiwydnitLlCcoHpcaig4ZgUiPnS B6DE9mzNnCwshf3K1qf6L6fJTCXUBe73ityTPPWnPBAXmYWg9UMr+Aoq3cpgu/TUrcXb G13CksyTH3czD+U0J1lb8dY4Di/Ufv5xmv89apteiWSrQuuduGlDUWFuEggziqOrpKc3 2D9GYLjsR4D0tZA3p5oU/znZQVJZpVL9UyJHT/Moj4XoUJXE7bNDhvFYjqXrAT/LNeoR IkXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2bXrgqz8+4O90scVR4hpEhzhh7+xCxG2uSN4PwMReKc=; b=tHLSvaP4DnJc4zrR60ENMzi0qNL+ZHLv/yd3QBAnBCNtzOTL00mRtGLpqyn3Vuujjw 0elg+ggSA/oUvZEwTk5ahzFos1GUIvRvUbIRAxx4cVp/sekAnolc1rgTAAPHWNotBmiP yZLoJw+qsD6XhA5fMTxq4+di7rh+mHHAb+GozgGZl8Jc3Y2QiMdeDodEq9k7ts6ByafC N78tJ3B2/fjkrzFobsjb2g0kV8+YTvp0kdHJYH06xWOZ/eWuAhUzlVXk6LQ2CAVouhpV 8IZC9vA4vX6LX19M74OkbTPH1jD7nnyGOoFqw93rrVQZh6FGXOgYTcv/fcf3euXE3AZW w5ZQ== X-Gm-Message-State: AMCzsaU8nm4wgbsv1OhBrTEUcfBnwNYpNafsgFKhqENdbOEpMxefL/2B Sb7JlwWtMlwDhtTPRAXhMA8hJg== X-Google-Smtp-Source: ABhQp+TydmdYxMLev3/6Xg/S7hDYbMTvjce5CgUwOQ4CsjcYjkrCrkSsuISUJOsDMyw76VZQEsGf+g== X-Received: by 10.101.67.196 with SMTP id n4mr7913180pgp.395.1509737822706; Fri, 03 Nov 2017 12:37:02 -0700 (PDT) Received: from marmot ([162.217.72.7]) by smtp.gmail.com with ESMTPSA id t63sm11739582pgc.19.2017.11.03.12.37.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Nov 2017 12:37:01 -0700 (PDT) Date: Fri, 3 Nov 2017 12:36:59 -0700 From: Peter Geoghegan To: Andres Freund Cc: Alvaro Herrera , "Wood, Dan" , 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: <20171103193659.GA3404@marmot> References: <20171102112019.33wb7g5wp4zpjelu@alap3.anarazel.de> <20171102124947.hshl7znx6ixy62pf@alvherre.pgsql> <20171102130551.i2w33sqdw3bdvetn@alap3.anarazel.de> <20171103145330.5ycjoje5s6lfwxps@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20171103145330.5ycjoje5s6lfwxps@alap3.anarazel.de> User-Agent: Mutt/1.5.24 (2015-08-30) 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 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. The commit message should probably say that the bug involves the resurrection of previously dead tuples, which is different to there being duplicates because a constraint is not enforced because HOT chains are broken (that's a separate, arguably less serious problem). >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. Which is >quite bad, because vacuum already processed it, and we'll set >relfrozenxid accordingly. I hope I'm missing something here? 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. -- Peter Geoghegan -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers