Skip to content

Commit 0507c07

Browse files
committed
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>
1 parent ac0e30e commit 0507c07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_dump/pg_backup_directory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ _PrintFileData(ArchiveHandle *AH, char *filename)
400400

401401
free(buf);
402402
if (cfclose(cfp) !=0)
403-
fatal("could not close data file: %m");
403+
fatal("could not close data file \"%s\": %m", filename);
404404
}
405405

406406
/*

0 commit comments

Comments
 (0)