Skip to content

Commit 883d1cc

Browse files
committed
Include kernel error message in failed-to-open file reports.
1 parent ef6164d commit 883d1cc

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.162 2000/08/29 09:36:41 petere Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.163 2000/08/29 16:40:19 tgl Exp $
1515
*
1616
* NOTES
1717
*
@@ -278,7 +278,7 @@ checkDataDir(const char *DataDir)
278278
fprintf(stderr, "%s does not know where to find the database system "
279279
"data. You must specify the directory that contains the "
280280
"database system either by specifying the -D invocation "
281-
"option or by setting the PGDATA environment variable.\n\n",
281+
"option or by setting the PGDATA environment variable.\n\n",
282282
progname);
283283
exit(2);
284284
}
@@ -289,11 +289,10 @@ checkDataDir(const char *DataDir)
289289
fp = AllocateFile(path, PG_BINARY_R);
290290
if (fp == NULL)
291291
{
292-
fprintf(stderr, "%s does not find the database system. "
293-
"Expected to find it "
294-
"in the PGDATA directory \"%s\", but unable to open file "
295-
"with pathname \"%s\".\n\n",
296-
progname, DataDir, path);
292+
fprintf(stderr, "%s does not find the database system."
293+
"\n\tExpected to find it in the PGDATA directory \"%s\","
294+
"\n\tbut unable to open file \"%s\": %s\n\n",
295+
progname, DataDir, path, strerror(errno));
297296
exit(2);
298297
}
299298

0 commit comments

Comments
 (0)