diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2020-09-24 20:45:57 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2020-09-24 21:04:21 +0200 |
commit | c005eb00e7d878cb869854f592103f774e15d01e (patch) | |
tree | 0cc96e69b8be5eeab99b13c1a50058e4612ff50f /src/backend/access/transam/twophase.c | |
parent | aecf5ee2bb36c597d3c6142e367e38d67816c777 (diff) | |
download | postgresql-c005eb00e7d878cb869854f592103f774e15d01e.tar.gz postgresql-c005eb00e7d878cb869854f592103f774e15d01e.zip |
Standardize the printf format for st_size
Existing code used various inconsistent ways to printf struct stat's
st_size member. The type of that is off_t, which is in most cases a
signed 64-bit integer, so use the long long int format for it.
Diffstat (limited to 'src/backend/access/transam/twophase.c')
-rw-r--r-- | src/backend/access/transam/twophase.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index ef4f9981e35..79400604431 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -1243,10 +1243,10 @@ ReadTwoPhaseFile(TransactionId xid, bool missing_ok) stat.st_size > MaxAllocSize) ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg_plural("incorrect size of file \"%s\": %zu byte", - "incorrect size of file \"%s\": %zu bytes", - (Size) stat.st_size, path, - (Size) stat.st_size))); + errmsg_plural("incorrect size of file \"%s\": %lld byte", + "incorrect size of file \"%s\": %lld bytes", + (long long int) stat.st_size, path, + (long long int) stat.st_size))); crc_offset = stat.st_size - sizeof(pg_crc32c); if (crc_offset != MAXALIGN(crc_offset)) @@ -1270,8 +1270,8 @@ ReadTwoPhaseFile(TransactionId xid, bool missing_ok) errmsg("could not read file \"%s\": %m", path))); else ereport(ERROR, - (errmsg("could not read file \"%s\": read %d of %zu", - path, r, (Size) stat.st_size))); + (errmsg("could not read file \"%s\": read %d of %lld", + path, r, (long long int) stat.st_size))); } pgstat_report_wait_end(); |