summaryrefslogtreecommitdiff
path: root/src/backend/backup
diff options
context:
space:
mode:
authorPeter Eisentraut2023-01-16 08:20:44 +0000
committerPeter Eisentraut2023-01-16 08:44:04 +0000
commit1561612e3bf3264c31618b9455d0c1003b9271ec (patch)
tree926f5ddd1fa007d09d96c837f5b338a4e2a43679 /src/backend/backup
parent9a740f81eb02e04179d78f3df2ce671276c27b07 (diff)
Fix some BufFileRead() error reporting
Remove "%m" from error messages where errno would be bogus. Add short read byte counts where appropriate. This is equivalent to what was done in 7897e3bb902c557412645b82120f4d95f7474906, but some code was apparently developed concurrently to that and not updated accordingly. Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/f3501945-c591-8cc3-5ef0-b72a2e0eaa9c@enterprisedb.com
Diffstat (limited to 'src/backend/backup')
-rw-r--r--src/backend/backup/backup_manifest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/backup/backup_manifest.c b/src/backend/backup/backup_manifest.c
index 21ca2941dc..d325ef047a 100644
--- a/src/backend/backup/backup_manifest.c
+++ b/src/backend/backup/backup_manifest.c
@@ -371,7 +371,8 @@ SendBackupManifest(backup_manifest_info *manifest, bbsink *sink)
if (rc != bytes_to_read)
ereport(ERROR,
(errcode_for_file_access(),
- errmsg("could not read from temporary file: %m")));
+ errmsg("could not read from temporary file: read only %zu of %zu bytes",
+ rc, bytes_to_read)));
bbsink_manifest_contents(sink, bytes_to_read);
manifest_bytes_done += bytes_to_read;
}