mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
The following patch makes postmaster -D work. -D specifies a different PGDATA
directory. The code that looks for the pg_hba file doesn't use it, though, so the postmaster uses the wrong pg_hba file. Also, when the postmaster looks in one directory and the user thinks it is looking in another directory, the error messages don't give enough information to solve the problem. I extended the error message for this. Submitted by: Bryan Henderson <bryanh@giraffe.netgate.net>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.4 1996/08/06 16:43:24 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.5 1996/08/14 04:51:34 scrappy Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -1110,8 +1110,10 @@ checkDataDir()
|
||||
sprintf(path, "%s%cbase%ctemplate1%cpg_class", DataDir, SEP_CHAR, SEP_CHAR,
|
||||
SEP_CHAR);
|
||||
if ((fp=fopen(path, "r")) == NULL) {
|
||||
fprintf(stderr, "%s: data base not found in directory \"%s\"\n",
|
||||
progname, DataDir);
|
||||
fprintf(stderr, "%s does not find the database. Expected to find it "
|
||||
"in the PGDATA directory \"%s\", but unable to open directory "
|
||||
"with pathname \"%s\".\n",
|
||||
progname, DataDir, path);
|
||||
exit(2);
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
Reference in New Issue
Block a user