From: Alvaro Herrera Date: Fri, 8 May 2020 23:38:46 +0000 (-0400) Subject: pg_restore: Provide file name with one failure message X-Git-Tag: REL_10_13~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8635747ee9c07844819075675b2c5c07a7e016e;p=thirdparty%2Fpostgresql.git 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 Discussion: https://postgr.es/m/CAH503wA_VOrcKL_43p9atRejCDYmOZ8MzfK9S6TJrQqBqNeAXA@mail.gmail.com Reviewed-by: Álvaro Herrera --- diff --git a/src/bin/pg_dump/pg_backup_directory.c b/src/bin/pg_dump/pg_backup_directory.c index 112fbb0f0c8..1caf89598a3 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)); } /*