summaryrefslogtreecommitdiff
path: root/src/backend/postmaster
diff options
context:
space:
mode:
authorBruce Momjian2006-02-01 00:31:59 +0000
committerBruce Momjian2006-02-01 00:31:59 +0000
commit62a142036ba59c8167ab4539a414e56ba4c39faa (patch)
tree5c0ebf00e2e9a5569db8ea3a1985224fe7f796d0 /src/backend/postmaster
parentc6ef3264bebd442ae19a850abd774ed4bde1722f (diff)
Set progname early in the postmaster/postgres binary, rather than doing
it later. This fixes a problem where EXEC_BACKEND didn't have progname set, causing a segfault if log_min_messages was set below debug2 and our own snprintf.c was being used. Also alway strdup() progname. Backpatch to 8.1.X and 8.0.X.
Diffstat (limited to 'src/backend/postmaster')
-rw-r--r--src/backend/postmaster/postmaster.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 43deb57aa2c..78d0471f85d 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.479 2006/01/06 02:58:25 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.480 2006/02/01 00:31:59 momjian Exp $
*
* NOTES
*
@@ -171,9 +171,6 @@ char *ListenAddresses;
*/
int ReservedBackends;
-
-static const char *progname = NULL;
-
/* The socket(s) we're listening to. */
#define MAXLISTEN 64
static int ListenSocket[MAXLISTEN];
@@ -383,9 +380,6 @@ PostmasterMain(int argc, char *argv[])
char *userDoption = NULL;
int i;
- /* This will call exit() if strdup() fails. */
- progname = get_progname(argv[0]);
-
MyProcPid = PostmasterPid = getpid();
IsPostmasterEnvironment = true;