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 1l3hps-0003f5-PV for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Jan 2021 16:01:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l3hpq-0003dY-Do for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Jan 2021 16:01:54 +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 1l3hpp-0003dR-Hr for pgsql-hackers@lists.postgresql.org; Sun, 24 Jan 2021 16:01:54 +0000 Received: from [64.147.123.25] (helo=wout2-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l3hpl-0000xh-6M for pgsql-hackers@lists.postgresql.org; Sun, 24 Jan 2021 16:01:52 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 7BAA4C7F; Sun, 24 Jan 2021 11:01:37 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 24 Jan 2021 11:01:37 -0500 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:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=oX+Ydt46I3Wt9hHoqCZI2t5Q59vJ0DSM2JNYMd74faM=; b=iI/vkQiM b13wtnE6CsQqwPUlAXUmC0JA4NZQ4Qpv5w3DLMSxInFyc0yvfa8flesTgIIcpM4w 1wnCusJDhLEQ8n9y+QUtiJ6S4BJzCVmN8RNvw5nJyfev87v0wlR+i3cNWKCK2mXy dVQJiI8pNyYdzq7vP2e76cPxmzTE8IiHB5XTQxf5kVAuadWGG7olagCjvoqnWnBY PKVte954MHA6k8SD4Id+rF/ADQywViIx4yaRtIsBOGHIEKc8PJRFTb7sgK3GxV5C t11vVxJqaUOkrRTQstSWQdNRY82lTH8Xm3BKu3Euo3dP9NX8ngtgwYEe6A52hdg9 9ZqieAzjRZfeKQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddugdekhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjfgesthekre dttderudenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgv segrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepueffhfejieeuue ffgedvudekgeeltdeviedvieeufeeiieevgfetheeufeethedvnecukfhppeduledtrdel hedrudelrddujeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.177]) by mail.messagingengine.com (Postfix) with ESMTPA id 40B59108005C; Sun, 24 Jan 2021 11:01:36 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id F04E42A0FC3; Sun, 24 Jan 2021 13:01:33 -0300 (-03) Date: Sun, 24 Jan 2021 13:01:33 -0300 From: Alvaro Herrera To: Julien Rouhaud Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Faulty HEAP_XMAX_LOCK_ONLY & HEAP_KEYS_UPDATED hintbit combination Message-ID: <20210124160133.GA32557@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210124061758.GA11756@nol> User-Agent: Mutt/1.10.1 (2018-07-13) X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.25 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021-Jan-24, Julien Rouhaud wrote: > + /* > + * Do not allow tuples with invalid combinations of hint bits to be placed > + * on a page. These combinations are detected as corruption by the > + * contrib/amcheck logic, so if you disable one or both of these > + * assertions, make corresponding changes there. > + */ > + Assert(!((tuple->t_data->t_infomask & HEAP_XMAX_LOCK_ONLY) && > + (tuple->t_data->t_infomask2 & HEAP_KEYS_UPDATED))); > > > I attach a simple self contained script to reproduce the problem, the last > UPDATE triggering the Assert. > > I'm not really familiar with this part of the code, so it's not exactly clear > to me if some logic is missing in compute_new_xmax_infomask() / > heap_prepare_insert(), or if this should actually be an allowed combination of > hint bit. Hmm, it's probably a bug in compute_new_xmax_infomask. I don't think the combination is sensible. -- Álvaro Herrera 39°49'30"S 73°17'W "There is evil in the world. There are dark, awful things. Occasionally, we get a glimpse of them. But there are dark corners; horrors almost impossible to imagine... even in our worst nightmares." (Van Helsing, Dracula A.D. 1972)