aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/postmaster/postmaster.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 78e66a06ac5..6376d430870 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -839,20 +839,20 @@ PostmasterMain(int argc, char *argv[])
#endif
/* For debugging: display postmaster environment */
+ if (message_level_is_interesting(DEBUG3))
{
extern char **environ;
char **p;
+ StringInfoData si;
- ereport(DEBUG3,
- (errmsg_internal("%s: PostmasterMain: initial environment dump:",
- progname)));
- ereport(DEBUG3,
- (errmsg_internal("-----------------------------------------")));
+ initStringInfo(&si);
+
+ appendStringInfoString(&si, "initial environment dump:");
for (p = environ; *p; ++p)
- ereport(DEBUG3,
- (errmsg_internal("\t%s", *p)));
- ereport(DEBUG3,
- (errmsg_internal("-----------------------------------------")));
+ appendStringInfo(&si, "\n%s", *p);
+
+ ereport(DEBUG3, errmsg_internal("%s", si.data));
+ pfree(si.data);
}
/*