Include kernel error message in failed-to-open file reports.
authorTom Lane <[email protected]>
Tue, 29 Aug 2000 16:40:19 +0000 (16:40 +0000)
committerTom Lane <[email protected]>
Tue, 29 Aug 2000 16:40:19 +0000 (16:40 +0000)
src/backend/postmaster/postmaster.c

index d7d2b99230f5f49f8a37744c4895f6798d679b40..986e0e038cba25be2a3de46291fbee0387446398 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.162 2000/08/29 09:36:41 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.163 2000/08/29 16:40:19 tgl Exp $
  *
  * NOTES
  *
@@ -278,7 +278,7 @@ checkDataDir(const char *DataDir)
                fprintf(stderr, "%s does not know where to find the database system "
                                "data.  You must specify the directory that contains the "
                                "database system either by specifying the -D invocation "
-                        "option or by setting the PGDATA environment variable.\n\n",
+                               "option or by setting the PGDATA environment variable.\n\n",
                                progname);
                exit(2);
        }
@@ -289,11 +289,10 @@ checkDataDir(const char *DataDir)
        fp = AllocateFile(path, PG_BINARY_R);
        if (fp == NULL)
        {
-               fprintf(stderr, "%s does not find the database system.  "
-                               "Expected to find it "
-                               "in the PGDATA directory \"%s\", but unable to open file "
-                               "with pathname \"%s\".\n\n",
-                               progname, DataDir, path);
+               fprintf(stderr, "%s does not find the database system."
+                               "\n\tExpected to find it in the PGDATA directory \"%s\","
+                               "\n\tbut unable to open file \"%s\": %s\n\n",
+                               progname, DataDir, path, strerror(errno));
                exit(2);
        }