summaryrefslogtreecommitdiff
path: root/src/backend/postmaster
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-06-06 16:04:32 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-06-06 16:04:32 +0000
commit4032a515d26eb2772c0f929db1dd8c38fcab3f92 (patch)
tree612c886d6c07554ea4d6759aa3119ebcf2ce5714 /src/backend/postmaster
parentbeb7f7f72d95755f1cb1667053426fe383bcbf6f (diff)
downloadpostgresql-4032a515d26eb2772c0f929db1dd8c38fcab3f92.tar.gz
PGPORT envar was erroneously ignored by the backend
Diffstat (limited to 'src/backend/postmaster')
-rw-r--r--src/backend/postmaster/postmaster.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index b578bc038f..161b832c32 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.146 2000/06/04 01:44:31 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.147 2000/06/06 16:04:29 petere Exp $
*
* NOTES
*
@@ -129,7 +129,7 @@ static Dllist *BackendList;
/* list of ports associated with still open, but incomplete connections */
static Dllist *PortList;
-int PostPortName = DEF_PGPORT;
+int PostPortName;
/*
* This is a boolean indicating that there is at least one backend that
@@ -381,6 +381,9 @@ PostmasterMain(int argc, char *argv[])
MyProcPid = getpid();
DataDir = getenv("PGDATA"); /* default value */
+ if (getenv("PGPORT"))
+ PostPortName = atoi(getenv("PGPORT"));
+
/*
* First we must scan for a -D argument to get the data dir. Then
* read the config file. Finally, scan all the other arguments.
@@ -543,9 +546,6 @@ PostmasterMain(int argc, char *argv[])
}
}
- if (PostPortName == 0)
- PostPortName = pq_getport();
-
/*
* Check for invalid combinations of switches
*/