1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

The problem is that read_pg_options needs DataDir to read its file but

DataDir is set after read_pg_options if postgres is called
interactively.  If postgres is forked by postgres DataDir is read from
the PGDATA enviromnent variable set by the postmaster and this explains
while the bug disappears.  I have written this patch but I don't like
it. Any better idea?

Massimo Dal Zotto
This commit is contained in:
Bruce Momjian
1998-10-16 06:05:18 +00:00
parent 9f69aa0831
commit 8fa2742ddf
3 changed files with 14 additions and 4 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.93 1998/10/13 20:05:44 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.94 1998/10/16 06:05:13 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@ -1053,6 +1053,11 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
break;
case 'D': /* PGDATA directory */
if (!DataDir) {
DataDir = optarg;
/* must be done after DataDir is defined */
read_pg_options(0);
}
DataDir = optarg;
break;
@ -1514,7 +1519,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
puts("$Revision: 1.93 $ $Date: 1998/10/13 20:05:44 $\n");
puts("$Revision: 1.94 $ $Date: 1998/10/16 06:05:13 $\n");
}
/* ----------------