Skip to content

Commit 4009571

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 91d9746 commit 4009571

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
@@ -411,8 +411,8 @@ _PrintFileData(ArchiveHandle *AH, char *filename)
411411

412412
free(buf);
413413
if (cfclose(cfp) !=0)
414-
exit_horribly(modulename, "could not close data file: %s\n",
415-
strerror(errno));
414+
exit_horribly(modulename, "could not close data file \"%s\": %s\n",
415+
filename, strerror(errno));
416416
}
417417

418418
/*

0 commit comments

Comments
 (0)