Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLwyq-0004vq-QY for pgsql-general@arkaria.postgresql.org; Thu, 24 May 2018 20:37:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fLwyo-0005ai-V7 for pgsql-general@arkaria.postgresql.org; Thu, 24 May 2018 20:36:58 +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.89) (envelope-from ) id 1fLwyo-0005aU-Jw for pgsql-general@lists.postgresql.org; Thu, 24 May 2018 20:36:58 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLwym-00011z-8c for pgsql-general@postgresql.org; Thu, 24 May 2018 20:36:57 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 94DE622478; Thu, 24 May 2018 16:36:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 24 May 2018 16:36:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; 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=kWnl/i9mA+TUZdRY2zyN2Fjbkqy7bFVQqVRgfpzVBH4=; b=lqBYYZ7/ R+dAsCySBjN2KMict5Crahsdcylkzye/WZTpdIWyrKxHcjiqf6Aaj2TLw3cLm59C FGqjTTn9Ue1rJkbVqBMUXX9yLvrXuCxq+tBeVgqD+6EDCQhlXh1a5tMSMJDCz9Lh pf7tnUdew/vg0g0N3qHO3gsaiqnypkqAavXP8JoCd9hM0C3uBVj4ohAY6OTDpddK 2FfvXpB/VxGiqkC00lEiPrDU2TeLKKle9ufN8drILe2hLVThXuDTuK853XpaXnTC laOP6Cc/kDOKaQ9ignYk0IFfaS9/EKVsW5Qm6QuUIAoUuwsUOW+nCX8c7fJtuD1k nTg9jTr4kWNp/g== 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=fm2; bh=kWnl/i9mA+TUZdRY2zyN2Fjbkqy7b FVQqVRgfpzVBH4=; b=P4NqiMEBM0gT9LVuw3alsvMiguExZ3FT9lcF4w5+4UD6K a1ru08qYbKyT5vCcFl3YrkcI9wLy5ptA4772Z8E6UrBmhRuUK1mrHcea86G7fp52 jwnScL3yU+Txs+vEZGz7WNjt7qBsFBbtWIw4hTLnG9c8hmX/f8HsOgmzFJDOgWL1 Hib7zqCZ9td3/+E/HA+BL2qZ8ICsWUY7S2SZQsPbM8NpX0Rj/X3dJ5VTOOIRdcmq FxMvAbLHDjiCPJJsgSJKJeCm50lmLJ3A0gFiurGILPA+PviGU5CwIxFBSTlkoyk0 dU/XkqNlIuMdgE44ux6Xvj6eXXgKTIajYpop6nkoA== X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 27F2D10255; Thu, 24 May 2018 16:36:55 -0400 (EDT) Date: Thu, 24 May 2018 13:36:54 -0700 From: Andres Freund To: Alvaro Herrera Cc: Maxim Boguk , Peter Geoghegan , Jeremy Finzel , Postgres General Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid Message-ID: <20180524203654.fr2gmo46buqa6i6s@alap3.anarazel.de> References: <20180524170853.gmep4arwx7i5m5o3@alvherre.pgsql> <20180524203054.k7lnxjbe2unfvsgm@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180524203054.k7lnxjbe2unfvsgm@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-05-24 13:30:54 -0700, Andres Freund wrote: > On 2018-05-24 13:08:53 -0400, Alvaro Herrera wrote: > > Hmm .. surely > > > > diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c > > index 5016181fd7..5d7fa1fb45 100644 > > --- a/src/backend/access/heap/heapam.c > > +++ b/src/backend/access/heap/heapam.c > > @@ -6690,7 +6690,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple, > > xid = HeapTupleHeaderGetXmin(tuple); > > xmin_frozen = ((xid == FrozenTransactionId) || > > HeapTupleHeaderXminFrozen(tuple)); > > - if (TransactionIdIsNormal(xid)) > > + if (!xmin_frozen && TransactionIdIsNormal(xid)) > > { > > if (TransactionIdPrecedes(xid, relfrozenxid)) > > ereport(ERROR, > > > > > > ?? > > I don't think that's necesary - HeapTupleHeaderGetXmin() returns > FrozenTransactionId if the tuple is frozen (note the > HeapTupleHeaderXminFrozen() within). FWIW, even if that weren't the case: a) there'd be a lot more wrong with this routine imo. b) some of the tuples affected clearly weren't frozen... Greetings, Andres Freund