aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/backup_manifest.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-01-16 09:20:44 +0100
committerPeter Eisentraut <peter@eisentraut.org>2023-01-16 09:48:09 +0100
commitf463335e1f29b8f5b47d8b606d10cdf76817970f (patch)
tree78252a9fc401dc57c2a55dfbf0eda920fef19007 /src/backend/replication/backup_manifest.c
parenta8b88c26f7061689ef1aea1b8fd234fed8e1fc9e (diff)
downloadpostgresql-f463335e1f29b8f5b47d8b606d10cdf76817970f.tar.gz
postgresql-f463335e1f29b8f5b47d8b606d10cdf76817970f.zip
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/replication/backup_manifest.c')
-rw-r--r--src/backend/replication/backup_manifest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/replication/backup_manifest.c b/src/backend/replication/backup_manifest.c
index 04ca455ace8..27191044871 100644
--- a/src/backend/replication/backup_manifest.c
+++ b/src/backend/replication/backup_manifest.c
@@ -377,7 +377,8 @@ SendBackupManifest(backup_manifest_info *manifest)
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)));
pq_putmessage('d', manifestbuf, bytes_to_read);
manifest_bytes_done += bytes_to_read;
}