Re: Switch buffile.c/h to use pgoff_t
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Chao Li <li.evan.chao@gmail.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>, Bryan Green <dbryan.green@gmail.com>
Date: 2025-12-22T22:49:21Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Upgrade BufFile to use int64 for byte positions
- bde3a4616072 19 (unreleased) landed
-
Switch buffile.c/h to use pgoff_t instead of off_t
- e5f3839af685 19 (unreleased) landed
On Fri, Dec 19, 2025 at 02:22:02PM +0900, Michael Paquier wrote: > 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. Getting rid of a couple more long assumptions while removing one portability comment from buffile.c is appealing while the change is not invasive, so applied. -- Michael