pgsql: Upgrade BufFile to use int64 for byte positions
| От | Michael Paquier |
|---|---|
| Тема | pgsql: Upgrade BufFile to use int64 for byte positions |
| Дата | |
| Msg-id | E1vYuyo-002hn9-2O@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/bde3a4616072534fd03c75f9019d5165665ed211 Modified Files -------------- src/backend/storage/file/buffile.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
В списке pgsql-committers по дате отправления: