Don't cast pgoff_t to possibly 32-bit types for output

pgoff_t is most likely a 64-bit integer, so casting it to a 32-bit
type for output could lose data.  In the cases addressed here, the
files cannot actually get that large, so this is only cosmetic and to
set better examples for the future.  (Similar issues that could have
actual practical impact were addressed separately in commit
e8f851d6172.)

In one case, the 32-bit size is baked into the protocol, so here we
add an elog and document this discrepancy.

Reviewed-by: Heikki Linnakangas <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/flat/20ce62fa-47fc-457b-b504-12f3c1651726%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/04fc2564fbbabe97cadbf782e8d40b8e3f7b22a5

Modified Files
--------------
src/backend/access/heap/rewriteheap.c | 4 ++--
src/backend/backup/walsummary.c       | 4 ++--
src/backend/replication/walsender.c   | 6 ++++++
src/backend/storage/file/fd.c         | 4 ++--
src/bin/pg_upgrade/slru_io.c          | 4 ++--
5 files changed, 14 insertions(+), 8 deletions(-)

Reply via email to