summaryrefslogtreecommitdiff
path: root/src/fe_utils/archive.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2020-09-24 20:45:57 +0200
committerPeter Eisentraut <peter@eisentraut.org>2020-09-24 21:04:21 +0200
commitc005eb00e7d878cb869854f592103f774e15d01e (patch)
tree0cc96e69b8be5eeab99b13c1a50058e4612ff50f /src/fe_utils/archive.c
parentaecf5ee2bb36c597d3c6142e367e38d67816c777 (diff)
downloadpostgresql-c005eb00e7d878cb869854f592103f774e15d01e.tar.gz
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/fe_utils/archive.c')
-rw-r--r--src/fe_utils/archive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fe_utils/archive.c b/src/fe_utils/archive.c
index 1e9d994af6..252dc0fb6a 100644
--- a/src/fe_utils/archive.c
+++ b/src/fe_utils/archive.c
@@ -71,9 +71,9 @@ RestoreArchivedFile(const char *path, const char *xlogfname,
{
if (expectedSize > 0 && stat_buf.st_size != expectedSize)
{
- pg_log_fatal("unexpected file size for \"%s\": %lu instead of %lu",
- xlogfname, (unsigned long) stat_buf.st_size,
- (unsigned long) expectedSize);
+ pg_log_fatal("unexpected file size for \"%s\": %lld instead of %lld",
+ xlogfname, (long long int) stat_buf.st_size,
+ (long long int) expectedSize);
exit(1);
}
else