postmaster: Reduce verbosity of environment dump debug message
Emitting each variable separately is unnecessarily verbose / hard to skim over. Emit the whole thing in one ereport() to address that. Also remove program name and function reference from the message. The former doesn't seem particularly helpful and the latter is provided by the elog.c infrastructure these days. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/leouteo5ozcrux3fepuhtbp6c56tbfd4naxeokidbx7m75cabz@hhw6g4urlowt
This commit is contained in:
parent
631db1d4b2
commit
6a5bcf7f7d
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user