agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't cast off_t to 32-bit type for output, bug fix
Date: Wed, 01 Jul 2026 08:00:21 +0000
Message-ID: <E1weprp-000sxL-1E@gemulon.postgresql.org> (raw)

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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/67235209ca05348bf388db731cee64895428b164

Modified Files
--------------
src/backend/backup/basebackup_server.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1weprp-000sxL-1E@gemulon.postgresql.org>
Permalink:  ../E1weprp-000sxL-1E@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1weprp-000sxL-1E@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Don't cast off_t to 32-bit type for output, bug fix
  In-Reply-To: <E1weprp-000sxL-1E@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox