diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-07-31 17:57:11 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-07-31 17:57:11 +0000 |
commit | a052cd4cc44403b6fc783815b9983615aa8924d3 (patch) | |
tree | 6db2a6bb7f57985b053affbe5290639096d1d2cb /src/backend/bootstrap/bootstrap.c | |
parent | ea7a8b9ed7111ad0529199775c25e5b9caea9b92 (diff) | |
download | postgresql-a052cd4cc44403b6fc783815b9983615aa8924d3.tar.gz postgresql-a052cd4cc44403b6fc783815b9983615aa8924d3.zip |
For EXEC_BACKEND case, BootstrapMain needs to recompute paths, same as
PostgresMain. Per Magnus Hagander.
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 2a4f9a6f503..794d79d16d6 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.190 2004/07/31 00:45:30 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.191 2004/07/31 17:57:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -225,6 +225,14 @@ BootstrapMain(int argc, char *argv[]) if (!IsUnderPostmaster) MemoryContextInit(); + /* Compute paths, if we didn't inherit them from postmaster */ + if (my_exec_path[0] == '\0') + { + if (find_my_exec(argv[0], my_exec_path) < 0) + elog(FATAL, "%s: could not locate my own executable path", + argv[0]); + } + /* * process command arguments */ @@ -262,7 +270,6 @@ BootstrapMain(int argc, char *argv[]) SetConfigOption("client_min_messages", debugstr, PGC_POSTMASTER, PGC_S_ARGV); pfree(debugstr); - break; } break; case 'F': |