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 1l7hP9-0002bz-9D for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Feb 2021 16:22:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l7hP8-0001up-1B for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Feb 2021 16:22:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7hP7-0001ud-8W for pgsql-hackers@lists.postgresql.org; Thu, 04 Feb 2021 16:22:49 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7hP0-0008GC-9y for pgsql-hackers@lists.postgresql.org; Thu, 04 Feb 2021 16:22:48 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 7331BE9D; Thu, 4 Feb 2021 11:22:39 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 04 Feb 2021 11:22:39 -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= fm2; bh=DUot0iDMd5ebu1IpgkM4O5OtLqYa5lMKt+imwwjzjJs=; b=BlSFlYXw CSNcoYI9XMxPQp6Hy4nf+ZTgOokl8wLsLDKDjdrfUqXsXMx9aT0LD1gwDvlcrfeo U3OEij3ybMBXScd4IKNnQgA6mnqnTIzmM0XxOhPLHmFM1rx2ukSdC2cXjyyKK/5l 0tKtl48H9Bw8fRi5gAZiUpV7G+NtAvGdkghoeqqhs6Egk13Zc/EoVLomPO8brBLv AveR/54zTqTQZl+NvwuBdPO/lSkLMX8D6HpgCEy6u7RO0qrXLe/qQuAFR9drOyUH 0wNMJUGRjXyIRf7LLPoP8WSn1uJZP2InLmhl/n7t0TJsiOAKACi/OdQsr8bF5PXW lDKknCS4TV8Kcw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgeeggdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjggfsehtkeertddtredunecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeeufffhjeeiueeuffegvddukeegledtveeivdeiueefieei vefgteehueefteehvdenucfkphepudeltddrleehrdduledrudejjeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.177]) by mail.messagingengine.com (Postfix) with ESMTPA id 75BFA108005F; Thu, 4 Feb 2021 11:22:38 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id A5B382A0E0B; Thu, 4 Feb 2021 13:22:35 -0300 (-03) Date: Thu, 4 Feb 2021 13:22:35 -0300 From: Alvaro Herrera To: Julien Rouhaud Cc: Mahendra Singh Thalor , PostgreSQL Hackers Subject: Re: Faulty HEAP_XMAX_LOCK_ONLY & HEAP_KEYS_UPDATED hintbit combination Message-ID: <20210204162235.GA18329@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210204160624.GA22612@nol> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021-Feb-05, Julien Rouhaud wrote: > - HEAP_KEYS_UPDATED > This bit lives in t_infomask2. If set, indicates that the XMAX updated > - this tuple and changed the key values, or it deleted the tuple. > - It's set regardless of whether the XMAX is a TransactionId or a MultiXactId. > + this tuple and changed the key values, or it deleted the tuple. It can also > + be set in combination of HEAP_XMAX_LOCK_ONLY. It's set regardless of whether > + the XMAX is a TransactionId or a MultiXactId. I think we should reword this more completely, to avoid saying one thing (that the op is an update or delete) and then contradicting ourselves (that it can also be a lock). I propose this: This bit lives in t_infomask2. If set, it indicates that the operation(s) done by the XMAX compromise the tuple key, such as a SELECT FOR UPDATE, an UPDATE that modifies the columns of the key, or a DELETE. Also, I just noticed that the paragraph just above this one says that HEAP_XMAX_EXCL_LOCK is used for both SELECT FOR UPDATE and SELECT FOR NO KEY UPDATE, and that this bit is what differentiates them. -- Álvaro Herrera Valdivia, Chile "Oh, great altar of passive entertainment, bestow upon me thy discordant images at such speed as to render linear thought impossible" (Calvin a la TV)