Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jyj5Y-0006Vy-Fn for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jul 2020 21:49:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jyj5X-0001WK-DY for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jul 2020 21:49:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jyj5X-0001Ut-3Y for pgsql-hackers@lists.postgresql.org; Thu, 23 Jul 2020 21:49:15 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jyj5U-0000jx-QJ for pgsql-hackers@postgresql.org; Thu, 23 Jul 2020 21:49:14 +0000 Received: by mail-qk1-x741.google.com with SMTP id h7so6904200qkk.7 for ; Thu, 23 Jul 2020 14:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=QmVVnoVvcW8Mdyzilrn0krXzhINtNviMHcg1Y/afQoc=; b=f+uSruwWgh/B9cspr7pVAVNOVQDOVJAMorSOmNV38Q29weVWDgYeetZbPLofDiR5cZ tRAjqZ255mDzf8CuE//P+gc+Xpyf7nD0qcAylZ6lKQnhYZJL1iK4+L5u6cZ9nEhFtMK0 6Jyo4io+V+CNl2280FQBMbBNWxCaRde2XsS4UcEkPpWaP1JuUIzC+SCu3ElyQNsBvNzt GfM5vTgC2s9tok8+fv9WpuqFoD2IpQ1HfYXbizdexzsNAl7eq3ENOQswzH+fTcGT1Kmh d8JLJmkyNOQuydd4a+Jbkc1t0bn6zDx34CeeNYw7Mow2FnFqRd0tSpG7FraZE77zXku1 GCJA== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=QmVVnoVvcW8Mdyzilrn0krXzhINtNviMHcg1Y/afQoc=; b=qKeXvxUXTm9GMIJIzz1RrHweF2US4DFfQ/eKFP8l2ZNk3qwq64gpMuMEgHyqJBLHYj IDVynjnnk5U87ToFYNXPfOjJCnFhx+NBAahr0xJRfjcyIGR+kXAvqvjWPXYdxIKBjuk0 le1+r1WFsV4eQTybK09PGMa3YscCSZ3SJAgLPlQkp4FZBP2HWt4/4F1AdRkJNKMT5E95 Ds+h9/yKppWoB1PE5oDIB5eH6jzBc8np90LfFM0GMqacm3ue+mithJ7xBlszAMwFbg3j 1qlW5qecSF4fAo6EEH3XqmO4xNOlWapytZDmE0VIwuCb6sC4Mgl4szpRMAqH5ZdbaVKE tZyA== X-Gm-Message-State: AOAM533PXf3KFYe7xK0lHsrhvqFDgQjnBxFRwrdwelkz+AV7qWvZAYkd c68MXAEdK/0ot918JLpSZY7RYQ== X-Google-Smtp-Source: ABdhPJwTp3nsThuS66vdauhzJIzdj+TSBlZPF5mw1mH1+i519ZOW/tHb9KHYj/RddCt0ncLRq7yJzg== X-Received: by 2002:a37:de19:: with SMTP id h25mr7410121qkj.354.1595540951775; Thu, 23 Jul 2020 14:49:11 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id m63sm3277089qte.32.2020.07.23.14.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 14:49:11 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 56FC02A36ED; Thu, 23 Jul 2020 17:49:09 -0400 (-04) Date: Thu, 23 Jul 2020 17:49:09 -0400 From: Alvaro Herrera To: Andres Freund Cc: pgsql-hackers@postgresql.org, Peter Geoghegan Subject: Re: heap_abort_speculative() sets xmin to Invalid* without HEAP_XMIN_INVALID Message-ID: <20200723214909.GA19828@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200723194042.bygzsr6m23pwwkhd@alap3.anarazel.de> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jul-23, Andres Freund wrote: > I think we should change heap_abort_speculative() to set > HEAP_XMIN_INVALID in master. +1 > But we can't really do anything about > existing tuples without it - therefore we will have to forever take care > about encountering that combination :(. > > Perhaps we should instead or additionally make > HeapTupleHeaderXminInvalid() explicitly check for InvalidTransactionId? +1 for doing it as an additional fix, with a fat comment somewhere explaining where such tuples would come from. Additionally, but perhaps not very usefully, maybe we could have a mechanism to inject such tuples so that code can be hardened against the condition. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services