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))
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();
else
elevel = FATAL;
ereport(elevel,
- (errmsg("archive file \"%s\" has wrong size: %lu instead of %lu",
+ (errmsg("archive file \"%s\" has wrong size: %lld instead of %lld",
xlogfname,
- (unsigned long) stat_buf.st_size,
- (unsigned long) expectedSize)));
+ (long long int) stat_buf.st_size,
+ (long long int) expectedSize)));
return false;
}
else
if (statbuf.st_size != WalSegSz)
{
- pg_log_warning("segment file \"%s\" has incorrect size %d, skipping",
- dirent->d_name, (int) statbuf.st_size);
+ pg_log_warning("segment file \"%s\" has incorrect size %lld, skipping",
+ dirent->d_name, (long long int) statbuf.st_size);
continue;
}
}
report_fatal_error("could not read file \"%s\": %m",
manifest_path);
else
- report_fatal_error("could not read file \"%s\": read %d of %zu",
- manifest_path, rc, (size_t) statbuf.st_size);
+ report_fatal_error("could not read file \"%s\": read %d of %lld",
+ manifest_path, rc, (long long int) statbuf.st_size);
}
/* Close the manifest file. */
if (m->size != sb.st_size)
{
report_backup_error(context,
- "\"%s\" has size %zu on disk but size %zu in the manifest",
- relpath, (size_t) sb.st_size, m->size);
+ "\"%s\" has size %lld on disk but size %zu in the manifest",
+ relpath, (long long int) sb.st_size, m->size);
m->bad = true;
}
{
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