Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a052cd4

Browse files
committed
For EXEC_BACKEND case, BootstrapMain needs to recompute paths, same as
PostgresMain. Per Magnus Hagander.
1 parent ea7a8b9 commit a052cd4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/backend/bootstrap/bootstrap.c

+9-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.190 2004/07/31 00:45:30 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.191 2004/07/31 17:57:11 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -225,6 +225,14 @@ BootstrapMain(int argc, char *argv[])
225225
if (!IsUnderPostmaster)
226226
MemoryContextInit();
227227

228+
/* Compute paths, if we didn't inherit them from postmaster */
229+
if (my_exec_path[0] == '\0')
230+
{
231+
if (find_my_exec(argv[0], my_exec_path) < 0)
232+
elog(FATAL, "%s: could not locate my own executable path",
233+
argv[0]);
234+
}
235+
228236
/*
229237
* process command arguments
230238
*/
@@ -262,7 +270,6 @@ BootstrapMain(int argc, char *argv[])
262270
SetConfigOption("client_min_messages", debugstr,
263271
PGC_POSTMASTER, PGC_S_ARGV);
264272
pfree(debugstr);
265-
break;
266273
}
267274
break;
268275
case 'F':

0 commit comments

Comments
 (0)