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.96) (envelope-from ) id 1vWSwV-001lrV-1C for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Dec 2025 05:22:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vWSwU-006GI6-18 for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Dec 2025 05:22:19 +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.96) (envelope-from ) id 1vWSwU-006GHx-0B for pgsql-hackers@lists.postgresql.org; Fri, 19 Dec 2025 05:22:18 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vWSwT-001S1P-1i for pgsql-hackers@lists.postgresql.org; Fri, 19 Dec 2025 05:22:17 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5991E7A005F; Fri, 19 Dec 2025 00:22:16 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Fri, 19 Dec 2025 00:22:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc: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=fm1; t=1766121736; x=1766208136; bh=sHcwgSPQ4m ZpxcqDB2gxuYhAC8upSJx/hWt2/K2Hz3s=; b=gOsYfT3vVBnUQDcknssV+F1D5c eXnvKTSE9hmilo+gH50FU/YOqaMW4bclWAH2lnl6fzqmrk2Oz2dOIsbPogVkyCLJ v5MwtztpMMbCI6j1qnHB9M5Pjf7SSQj0GlaOCslEQelUNInOxAvwot+OLX8xffLg F5nzB/tpbcfUHlKzTsH1f/SujpHymqBPsT3dU/QPvq5BGQcEfbe8EbfyxsOxvn9W cgkiT2lDx5L3m2uJJk3r8RpgjfwyD4OUnwlgE5HTWBLnDW2x+mhpwLhRdgQAp8j1 j6LVX3EfJYjXCpTljWOPk5Y+MjG0b3+VmCIHlYSiXzHx2eVLSV9zBRRE187Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1766121736; x=1766208136; bh=sHcwgSPQ4mZpxcqDB2gxuYhAC8upSJx/hWt 2/K2Hz3s=; b=LNpAszHviTQ7zyF34lxljJS+uaVsLJ3466AZ680aqb2L03zicM+ YEFhTWxAksh+O63oOgTEdj2GzZeNS1/l+eqxwxY0n8ETDzmhcEJIYG4HuPIscPA+ AvPqV5wXy1qxZprhiJdE75oksTxl7NPk52J9Q2tXpV5dbapko1UeSXrABR+HMseE BaIi8ezMhnlLRvW3VIXYrqY7XHM65Kx6kwxhY9BTvBAtv8dVl1HTc+hxAqFa6Wdf lDlyZjhzSjWd5ty5YawWAgwCa5Lpe4hZUpywG76aDlRypjCPV47NfnZp87OH+zSN vK48JRwRchM9/27E56+6TL+B3qFqnJBmUbg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdegjeeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvden ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeff hfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehlihdrvg hvrghnrdgthhgrohesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggt khgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopegusg hrhigrnhdrghhrvggvnhesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 19 Dec 2025 00:22:14 -0500 (EST) Date: Fri, 19 Dec 2025 14:22:02 +0900 From: Michael Paquier To: Chao Li Cc: Postgres hackers , Bryan Green Subject: Re: Switch buffile.c/h to use pgoff_t Message-ID: References: <85F6E9BB-59E8-4BD5-9FC1-357C3ACD5F87@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pKaV4pTbAB7Pp6yp" Content-Disposition: inline In-Reply-To: <85F6E9BB-59E8-4BD5-9FC1-357C3ACD5F87@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --pKaV4pTbAB7Pp6yp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 19, 2025 at 11:00:54AM +0800, Chao Li wrote: > Given MAX_PHYSICAL_FILESIZE is just 1G (2^30), why availbytes has to > be pgoff_t instead of just int? The point of such changes would be to lift this barrier at some point, which is what the other thread I am mentioning upthread is also pointing at. It does not change the fact that this code is currently not portable as written: off_t can be 4 or 8 bytes depending on the environment, and pgoff_t exists to be a stable alternative. This relates as well to the use of long in the tree, all coming down to WIN32. -- Michael --pKaV4pTbAB7Pp6yp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmlE4PoACgkQnvQgOdby QH18tg/+NNybr1SORKmLfBOIqeyKdFdnMlC4yD+zqeAS8K+EAckVfsP+pyB2feyx AmJOQhWG00io/pAY9sLSdYyfvZl16evwmJswwe2wqX0/7lcn/+64SCsUdqytcQvK FOi5vlm7k2YkGJd0lzx7JL/dytlUUDIvQOAPyewsXRQg7tb1zEqirY6nFgfzyIXh XXvcF8P9L/2SVi8N8L1s85yXaIVbK9KnNW0dYWAhyhgIXnYtgZ+uzevXt4fkxWdZ 8V4/c9m4bjZ6PWxmU4ULkSwqRDy0H85XAx1N7OWrwVfz/QQDBo+kxtQbaKVvu4Ax 1ZbvhGYxrphg5lKqoq5bJqmQrXqlCaBXQIglOyG9yPZUowtiFIZSVxKC1iz4A56W FmYl5diiCE1gETYcIZ8FoptNpAt5E5dEhmZTYNThNRlYDk9E5H3AVo+DiverJ/1P tnY5p7OpmtCG1AGtm2fcJRSVtpTchPNkRwlAlmozuGdbdwFFYjb+di+1Jj7pQywr F4pO/b2mCUi4MQ2eCSji0pyTSlAtDCTvPoXhUvjQfhPgU5U11q4qOU8OSrTcna7K XT1iRpyo9GvXrMalGmIfq0N+k63dvx+L3MEihQM9dfaXDHLctkU/h0pDSyVCZyIq hW3Se6IZmvFfMTqH95D/BclmcMdrRvD5y99l5G6nWsZtHgjQCEo= =g8dp -----END PGP SIGNATURE----- --pKaV4pTbAB7Pp6yp--