summaryrefslogtreecommitdiff
path: root/src/backend/postmaster
diff options
context:
space:
mode:
authorTom Lane2001-10-22 19:41:38 +0000
committerTom Lane2001-10-22 19:41:38 +0000
commit94daee3cb79e5e83a8b4917b226ab4a99dea5ed7 (patch)
treee5e026e5561e58c116c5260d257a6dc277e1799a /src/backend/postmaster
parenta19f2605ed66ba664389dacae20b3085703991b5 (diff)
Further cleanup of ps_status setup code. On platforms where the
environment strings need to be moved around, do so when called from initial startup (main.c), not in init_ps_status. This eliminates the former risk of invalidating saved environment-string pointers, since no code has yet had a chance to grab any such pointers when main.c is running.
Diffstat (limited to 'src/backend/postmaster')
-rw-r--r--src/backend/postmaster/pgstat.c8
-rw-r--r--src/backend/postmaster/postmaster.c12
2 files changed, 3 insertions, 17 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c
index 44ce0b750f6..6aae169202c 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -16,7 +16,7 @@
*
* Copyright (c) 2001, PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.12 2001/10/21 03:25:35 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.13 2001/10/22 19:41:38 tgl Exp $
* ----------
*/
#include "postgres.h"
@@ -1185,9 +1185,6 @@ pgstat_main(void)
/*
* Identify myself via ps
- *
- * WARNING: On some platforms the environment will be moved around to
- * make room for the ps display string.
*/
init_ps_display("stats collector process", "", "");
set_ps_display("");
@@ -1470,9 +1467,6 @@ pgstat_recvbuffer(void)
/*
* Identify myself via ps
- *
- * WARNING: On some platforms the environment will be moved around to
- * make room for the ps display string.
*/
init_ps_display("stats buffer process", "", "");
set_ps_display("");
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 5009185952d..08a6ce22c1d 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.250 2001/10/21 03:25:35 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.251 2001/10/22 19:41:38 tgl Exp $
*
* NOTES
*
@@ -2090,12 +2090,7 @@ DoBackend(Port *port)
}
/*
- * Set process parameters for ps
- *
- * WARNING: On some platforms the environment will be moved around to
- * make room for the ps display string. So any references to
- * optarg or getenv() from above will be invalid after this call.
- * Better use strdup or something similar.
+ * Set process parameters for ps display.
*/
init_ps_display(port->user, port->database, remote_host);
set_ps_display("authentication");
@@ -2443,9 +2438,6 @@ SSDataBase(int xlop)
/*
* Identify myself via ps
- *
- * WARNING: On some platforms the environment will be moved around to
- * make room for the ps display string.
*/
switch (xlop)
{