Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sojeM-00DRa4-CU for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Sep 2024 13:14:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sojeM-007sDC-0C for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Sep 2024 13:14:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sojeK-007sD3-K4 for pgsql-hackers@lists.postgresql.org; Thu, 12 Sep 2024 13:14:17 +0000 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sojeH-000o6u-F5 for pgsql-hackers@lists.postgresql.org; Thu, 12 Sep 2024 13:14:15 +0000 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 1B3C013801C1; Thu, 12 Sep 2024 09:14:12 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 12 Sep 2024 09:14:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1726146852; x= 1726233252; bh=5eJR9bfurNi/5CTlbFDuklYNjoBvN9dEZeDl+adGDgo=; b=m O0kiNZEjoBiyYoRKMhSVEXNsXp9bV5+LUnGxh27mvs+T9ifAtYly2IZYhd0+v9b+ mAmXXFE5ZXoxoxQaQrUaB85NGzDqYCdr8ngT6XlS94tzkh2o17z/gKMOb8Kahuj0 N4WyGCQECpt98Ww3Naw9JxP3VRGpC2mEIz0lV0xXxyoBwq/pk/qGGGhI32bOgnnj QScJRLF/fJKLtMEs7QgGgtn9T0kXUIhfSQVIRa0IE7UlVyr3CKPjd1kO03pZsEOx ZCYqA8duew14DQ0QYZK1xgnkrClC4X1HNDsmuL4Fnn2DadfkiRnJYjz7ZQBOUXok imcz8fkPsfxMv1J1/NJqA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudejfedgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeen ucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffh jeejhffgieeuueekjeekfffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprh gtphhtthhopeeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrvghkohhrohht khhovhesghhmrghilhdrtghomhdprhgtphhtthhopehorhhlohhvmhhgsehgmhgrihhlrd gtohhmpdhrtghpthhtohepphgrshhhkhhinhdrvghlfhgvsehgmhgrihhlrdgtohhmpdhr tghpthhtohepqhhiuhifvghnhhhuihhfgiesghhmrghilhdrtghomhdprhgtphhtthhope hhlhhinhhnrghkrgesihhkihdrfhhipdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghr sheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Sep 2024 09:14:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1726146848; bh=gjj/bQA9UqZt9zfGPTmBfmlMgxQVCcdmFRwLg5Aw/Mo=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=iqdvVO3v0diziwOdcRdlDg+mwrW+XA1OGgGiSCEgz28MOuN/D0CYUBpj90V6ZL+TZ qQ/VFufBkgl7SWVctsipfc8LYDfc1N3csBuDd6VA2Fwy+iVizGokhF+gfaiYtEOaCb Ec9L4v9pv8pj+8yg0OM+uCb6mF6QUhIObFAL5LKK8rYJBlNxgrkwUCKMcLs+RWFjq+ t6p3nUNhal47j8wLKFrcunt2lM3AB8RUJlii2d/xH3hHoUPCyCv5CSlnfQPTO+SD+r pRXtRMsLbXbxpyBVk8ExIgG5rLmNbL0rSpgLAMVsvd0ur+0acc3nPg4hWHqTnbN5kt YipIMGrPR4vDg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id ACCE59E; Thu, 12 Sep 2024 15:14:08 +0200 (CEST) Date: Thu, 12 Sep 2024 15:14:08 +0200 From: Alvaro Herrera To: Pavel Borisov Cc: Maxim Orlov , Alexander Korotkov , wenhui qiu , Heikki Linnakangas , Postgres hackers Subject: Re: POC: make mxidoff 64 bits Message-ID: <202409121314.ilzhahahenkj@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Sep-12, Pavel Borisov wrote: > Hi, Maxim! > > Previously we accessed offsets in shared MultiXactState without locks as > 32-bit read is always atomic. But I'm not sure it's so when offset become > 64-bit. > E.g. GetNewMultiXactId(): > > nextOffset = MultiXactState->nextOffset; > is outside lock. Good though. But fortunately I think it's not a problem. The one you say is with MultiXactGetLock held in shared mode -- and that works OK, as the assignment (in line 1263 at the bottom of the same routine) is done with exclusive lock held. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/