Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
pg_restore: Provide file name with one failure message
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 8 May 2020 23:38:46 +0000 (19:38 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 8 May 2020 23:38:46 +0000 (19:38 -0400)
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>
src/bin/pg_dump/pg_backup_directory.c

index 4aabb40f5958ad0702c117ce47f3bfeda1bafd1b..0ec049e6ea0d58c7bfe77cfad85720272b849e17 100644 (file)
@@ -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));
 }
 
 /*