Skip to content

Commit f863574

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 b50712b commit f863574

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_dump/pg_backup_directory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ _PrintFileData(ArchiveHandle *AH, char *filename)
406406

407407
free(buf);
408408
if (cfclose(cfp) !=0)
409-
exit_horribly(modulename, "could not close data file: %s\n",
410-
strerror(errno));
409+
exit_horribly(modulename, "could not close data file \"%s\": %s\n",
410+
filename, strerror(errno));
411411
}
412412

413413
/*

0 commit comments

Comments
 (0)