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 1sdchx-00H7hl-KQ for pgsql-committers@arkaria.postgresql.org; Mon, 12 Aug 2024 21:36:05 +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 1sdchw-000NFb-BE for pgsql-committers@arkaria.postgresql.org; Mon, 12 Aug 2024 21:36:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sdchw-000NFT-36 for pgsql-committers@lists.postgresql.org; Mon, 12 Aug 2024 21:36:04 +0000 Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sdcho-004X21-KA for pgsql-committers@lists.postgresql.org; Mon, 12 Aug 2024 21:36:03 +0000 Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-e08724b2a08so4335811276.1 for ; Mon, 12 Aug 2024 14:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723498555; x=1724103355; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pJeZT2/gcvdiQvUZDyqYwBM7lWFxD6inxYm8bRWfuMg=; b=A0eJqDF/rfdUNY9m/CYKgi+T3Ms3N53hmrIV37r5hH4g212yeIw1ruDsty/z2NtXZf UrYGs4HiywPiuoD/rDYATtnQ89wQF5r18UtPjg/tEGJHhxkf5bubBz24TWWzoIPRkl5U DSx7ysAKWwIAO0Eg4+W08Ib+PFY8A4Do3T9JaWxApQx4lxqOXmqcQEBi+QKPKyzGGUAM sXmliy5Z5QalOI7+5/hgcTHr/uuQ9YKClX+obM3ZBs+nUocYhB6MQDslW+DDhF5H+E4J ZwoMedMPG/FgyHL/WUexOguXZgjqwol5Lv1BUXYyd+xUE99XsPkSyFmEZiwPCKiLJG3Z rPxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723498555; x=1724103355; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pJeZT2/gcvdiQvUZDyqYwBM7lWFxD6inxYm8bRWfuMg=; b=cIW/eleP02sV+UCEPumSV8/e3NKJrbR9f9A9+dhituDJ/WKN8Mfm4J/eAp5nQa3yfi 1e4FCo/BxSZwGHRI0X2/dkL7t6j2qSrCJZF3mXhN2tf2szL1+UWBSUhp6sne6RVXmBuU aqTJSchc9YZ7nFLYvm0GnFXez6kz6mIjN91W4JBnW+nzE4z/Kdn/m8K2WAhbUATbZmuR oKAsU4DpwVMLHuKTn/uRi1dU6yAZdTwNgtFqfkHvjpIKMtJhcJqgORV5B+zIcVlsujsO mCILi9/R8+ThArbcQQyixiAlxvT4RCJSpkwer7ezX7rW+eZErmzWbMV7wBTpx8nXH8lA KjxQ== X-Forwarded-Encrypted: i=1; AJvYcCWFPCalqsJRSW77wgCQocFw8GMjdlEeLUIt8qn+48zwfz79DQNFSgmkbErRHIfftdC55Rz2lHF2l2BJFnlJGvw19ixYR2x+dc0kudtQR0npJeVj/a84 X-Gm-Message-State: AOJu0YzYrRstIQ4m3so366onoy5g8c4HVWfUpyvQJucDWLyqW6+N0+g5 9k3HNgK44w0k3S7gpEExRVpiq7C8Vd3G2ipPF4wDgjM3VGXMPp7tD/zlRJPDKjnELlXMOpTrLuc 74PyXzx/VEcq1Wi1L8Yb+xxh5iDc= X-Google-Smtp-Source: AGHT+IGfdQsIL96L6vqIOXiHPqwfuAyhMFOdcFuEHF3HMLu47+ecrYxp+ETNiDYjAm63eYHg0e/kkrZfkI08G17nEmo= X-Received: by 2002:a05:6902:2d07:b0:e0e:88fc:edc7 with SMTP id 3f1490d57ef6-e113ce8620bmr1943772276.16.1723498554961; Mon, 12 Aug 2024 14:35:54 -0700 (PDT) MIME-Version: 1.0 References: <7AD52B27-1F6A-4F1B-9420-8C11ADAC6343@paquier.xyz> In-Reply-To: From: Alexander Korotkov Date: Tue, 13 Aug 2024 00:35:43 +0300 Message-ID: Subject: Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe To: Peter Eisentraut Cc: Michael Paquier , pgsql-committers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Aug 9, 2024 at 4:09=E2=80=AFPM Peter Eisentraut wrote: > On 08.08.24 01:15, Michael Paquier wrote: > > =EF=BB=BF > >> On Aug 8, 2024, at 5:05, Alexander Korotkov wro= te: > >> =EF=BB=BFOn Wed, Aug 7, 2024 at 10:52=E2=80=AFPM Peter Eisentraut wrote: > >>> It looks like the commit I'm talking about here is a subset of v55-00= 01 > >>> from that thread? > >> > >> Yes, looks like this. > >> > >>> So why is some of this being committed now into v17? > >>> But as I wrote above, I think this approach is a bad idea. > >> > >> OK, I agree that might look annoying. So, it's better to revert now. > >> Michael, what do you think? > > > > The argument is two-fold here. The point of this change is that we were= forcibly doing a cast to int with int64 values returned, so this commit li= mits the risks of missing paths in the future, while being consistent with = all the SLRU code marking segment numbers with int64 for short *and* long s= egment file names. > > No, this is not what *this* patch does. (I suppose some of the related > patches might be doing that.) This patch just casts a few things that > are int to unsigned long long int before printing them. As pointed by Noah Misch [1], unlike the commit the patch [2] also changed segment-returning functions to return int64. Thus, in the patch output formats make much more sense, because they match the input data types. Michael, are you intended to push the remaining part of the patch [2]? Links 1. https://www.postgresql.org/message-id/20240810175055.cd.nmisch%40google.= com 2. https://www.postgresql.org/message-id/ZqGvzSbW5TGKqZcE%40paquier.xyz ------ Regards, Alexander Korotkov Supabase