Don't cast off_t to 32-bit type for output, bug fix
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-07-01T07:40:16Z
Releases:
19 (unreleased)
Don't cast off_t to 32-bit type for output, bug fix off_t is most likely a 64-bit integer, so casting it to a 32-bit type for output could lose data. There are more issues like this in the tree, but this is an instance where this could actually happen in practice, since base backups are routinely larger than 4 GB. So this is separated out as a bug fix. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://www.postgresql.org/message-id/flat/20ce62fa-47fc-457b-b504-12f3c1651726%40eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/backup/basebackup_server.c | modified | +4 −4 |
Discussion
- truncating casts of pgoff_t 4 messages · 2026-06-22 → 2026-07-07