aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2020-05-08 19:38:46 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2020-05-08 19:38:46 -0400
commit7b540f8707b716181f2b0d3db68e92868d09d867 (patch)
tree35e48f602a3f93308d80354bb64f2a3b561107fa
parent03a8a5f2d4a1f9886ad1d62d3f70424dfcdf8048 (diff)
downloadpostgresql-7b540f8707b716181f2b0d3db68e92868d09d867.tar.gz
postgresql-7b540f8707b716181f2b0d3db68e92868d09d867.zip
pg_restore: Provide file name with one failure message
Almost all error messages already include file name where relevant, but this one had been overlooked. Repair. Backpatch to 9.5. Author: Euler Taveira <euler.taveira@2ndquadrant.com> Discussion: https://postgr.es/m/CAH503wA_VOrcKL_43p9atRejCDYmOZ8MzfK9S6TJrQqBqNeAXA@mail.gmail.com Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
-rw-r--r--src/bin/pg_dump/pg_backup_directory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_backup_directory.c b/src/bin/pg_dump/pg_backup_directory.c
index 4aabb40f595..0ec049e6ea0 100644
--- a/src/bin/pg_dump/pg_backup_directory.c
+++ b/src/bin/pg_dump/pg_backup_directory.c
@@ -406,8 +406,8 @@ _PrintFileData(ArchiveHandle *AH, char *filename)
free(buf);
if (cfclose(cfp) !=0)
- exit_horribly(modulename, "could not close data file: %s\n",
- strerror(errno));
+ exit_horribly(modulename, "could not close data file \"%s\": %s\n",
+ filename, strerror(errno));
}
/*