1
0
mirror of https://github.com/postgres/postgres.git synced 2026-01-26 09:41:40 +03:00
Files
postgres/src/backend
Michael Paquier bde3a46160 Upgrade BufFile to use int64 for byte positions
This change has the advantage of removing some weird type casts, caused
by offset calculations based on pgoff_t but saved as int (on older
branches we use off_t, which could be 4 or 8 bytes depending on the
environment).  These are safe currently because capped by
MAX_PHYSICAL_FILESIZE, but we would run into problems when to make
MAX_PHYSICAL_FILESIZE larger or allow callers of these routines to use a
larger physical max size on demand.

While on it, this improves BufFileDumpBuffer() so as we do not use an
offset for "availbytes".  It is not a file offset per-set, but a number
of available bytes.

This change should lead to no functional changes.

Author: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/aUStrqoOCDRFAq1M@paquier.xyz
2025-12-26 08:41:56 +09:00
..
2025-01-01 11:21:55 -05:00
2025-12-11 15:13:04 -06:00
2025-05-05 12:04:49 +02:00
2025-12-02 10:09:32 +01:00
2025-12-11 15:13:04 -06:00
2025-12-26 07:53:46 +09:00
2025-12-24 17:09:13 +09:00
2025-03-26 19:45:32 -04:00