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 1sbmiN-001PP8-T7 for pgsql-committers@arkaria.postgresql.org; Wed, 07 Aug 2024 19:52:56 +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 1sbmiL-009fqT-Uk for pgsql-committers@arkaria.postgresql.org; Wed, 07 Aug 2024 19:52:53 +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 1sbmiK-009fqL-7v for pgsql-committers@lists.postgresql.org; Wed, 07 Aug 2024 19:52:53 +0000 Received: from fhigh1-smtp.messagingengine.com ([103.168.172.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbmiD-003amB-3q for pgsql-committers@lists.postgresql.org; Wed, 07 Aug 2024 19:52:51 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id ED6B8114B060; Wed, 7 Aug 2024 15:52:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 07 Aug 2024 15:52:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1723060362; x=1723146762; bh=zZtpnbLHzyN+GHo61NQ9sJ2Ce7IhsRVj 7YUTDgZRVhc=; b=fzg+OM/r8bhYEilgIqQFmmS3W6/basYGj4uVMYfT2SGLV2b8 o/t4znsemSm8zjSbdAd1ph2njeFuGyhXRLXCERxISriub8T87kPz1gG6wWQqxilL gHvPQUz/7qtjhAluffNJOSHlQ21W6MklbCKGiSXP/zgqeXnhuH9tSb9cNhauJwfg xI/RwKABQM5sVU+b/jSCdB9uRQSm5mJ7C6IoQupTxZb+19EbsHIxmbD431dcYwjf LUZk+WCPsjw/GIRHnZy/e1gfS4/4DcDIv7ffff+/yUgjh13H7qVAWxCOtNQS53gj 5jxAaNUpR75kC/29i8Bi8Su3Ri4xJ0uGgMv6Jw== 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 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1723060362; x= 1723146762; bh=zZtpnbLHzyN+GHo61NQ9sJ2Ce7IhsRVj7YUTDgZRVhc=; b=M bBvKxxMFHFuJrWzpdRrQzPkZwBQg7v9S2QiZWnW91Mbatt8NeB3hL+hxVraS2qeT TGduUiqX1ZHMB0z+a1Iao62i/fiPqNTfIzZ6uoClffhrohPD35tKn+tF1qiikgCI pgBE2mtBymiqbsuvHkUyyNj5aYyw5HNmigz+l1g8tEhkrLKKtbNd29wStvReECLH 5vINwhwmj5pK3V3cYEbXxw3wsc7Cfp3Kk6gLWZK1KMrKRIkIwkIKKqdvnDfNz+v3 GRNRTIoe2Gxa/d5XthEKv0Is73DKHAnK5jteUFX4tCYd1wY9SraQKsEqdiffpViQ qlacExajQxU8YHRNhI5qA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrledtgddugedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh eqnecuggftrfgrthhtvghrnhephefhffdtgeelfeekvdfhkeejheeuvdffvdeigedthfef gfeuheelteehgeffhfetnecuffhomhgrihhnpehpohhsthhgrhdrvghspdhpohhsthhgrh gvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdpnhgspghrtghpthhtoh eptd X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 7 Aug 2024 15:52:41 -0400 (EDT) Message-ID: <1b24364d-045e-4392-b98d-d335584cb42a@eisentraut.org> Date: Wed, 7 Aug 2024 21:52:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe To: Alexander Korotkov Cc: Michael Paquier , pgsql-committers@lists.postgresql.org References: <92fe572d-638e-4162-aef6-1c42a2936f25@eisentraut.org> Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 07.08.24 17:53, Alexander Korotkov wrote: > On Wed, Aug 7, 2024 at 12:07 PM Peter Eisentraut wrote: >> On 27.07.24 00:24, Michael Paquier wrote: >>> Fix more holes with SLRU code in need of int64 for segment numbers >>> >>> This is a continuation of 3937cadfd438, taking care of more areas I have >>> managed to miss previously. >>> >>> Reported-by: Noah Misch >>> Reviewed-by: Noah Misch >>> Discussion: https://postgr.es/m/20240724130059.1f.nmisch@google.com >>> Backpatch-through: 17 >>> >>> Branch >>> ------ >>> master >>> >>> Details >>> ------- >>> https://git.postgresql.org/pg/commitdiff/c9e24573905bef7fc3e4efb02bdb4d0cc8e43c51 >> >> I don't understand this patch. The previous patches that this >> references changed various variables to int64 and made adjustments >> following from that. But this patch takes variables and function >> results that are of type int and casts them to unsigned long long before >> printing. I don't see what that accomplishes, and it's not clear based >> on just the explanation that this is a continuation of a previous patch >> that doesn't do that. Is there a plan to change these things to int64 >> as well at some point? > > There is a plan indeed. The patchset [1] should include conversion > multixacts to 64-bit (It surely included that in earlier versions, I > didn't look the last versions though). I doubt this will be ready for > v18. So this commit might be quite preliminary. But I would prefer > to leave it there as soon as it has already landed. Opinions? I think you should change the output formats at the same time as you change the variable types. That way the compiler can cross-check this. Otherwise, if you later forget to change a variable, these casts will hide it. Or if the future patches turn out differently, then we have this useless code. > Links. > 1. https://www.postgresql.org/message-id/CAJ7c6TND0bCnwU1SmxTsFewK4XJGBep343vf%2BT%2BGQ-a5S5hC0w%40mail.gmail.com It looks like the commit I'm talking about here is a subset of v55-0001 from that thread? So why is some of this being committed now into v17? But as I wrote above, I think this approach is a bad idea.