summaryrefslogtreecommitdiff
path: root/src/backend/postmaster
diff options
context:
space:
mode:
authorBruce Momjian2004-05-11 21:57:15 +0000
committerBruce Momjian2004-05-11 21:57:15 +0000
commitfda15b351a8d5ac085e309ceda25e3a71cca27d7 (patch)
tree14329482d138feded83642194d280405ff4c070b /src/backend/postmaster
parent270c9aa34ad0448806ece6eb04f44bd60a5519dc (diff)
As part of the work for making relocatable installs, I have re-factored
all the code that looks for other binaries. I move FindExec into port/exec.c (and renamed it to find_my_binary()). I also added find_other_binary that looks for another binary in the same directory as the calling program, and checks the version string. The only behavior change was that initdb and pg_dump would look in the hard-coded bindir directory if it can't find the requested binary in the same directory as the caller. The new code throws an error. The old behavior seemed too error prone for version mismatches.
Diffstat (limited to 'src/backend/postmaster')
-rw-r--r--src/backend/postmaster/postmaster.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 1d781d0bb5a..e3df517d1ea 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.382 2004/05/06 19:23:25 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.383 2004/05/11 21:57:14 momjian Exp $
*
* NOTES
*
@@ -692,7 +692,7 @@ PostmasterMain(int argc, char *argv[])
/*
* On some systems our dynloader code needs the executable's pathname.
*/
- if (FindExec(pg_pathname, progname, "postgres") < 0)
+ if (find_my_binary(pg_pathname, progname, "postgres") < 0)
ereport(FATAL,
(errmsg("%s: could not locate postgres executable",
progname)));
@@ -3222,7 +3222,7 @@ CreateOptsFile(int argc, char *argv[])
FILE *fp;
int i;
- if (FindExec(fullprogname, argv[0], "postmaster") < 0)
+ if (find_my_binary(fullprogname, argv[0], "postmaster") < 0)
{
elog(LOG, "could not locate postmaster");
return false;