aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2024-11-27 11:17:23 -0500
committerAndres Freund <andres@anarazel.de>2024-11-27 11:17:23 -0500
commit6a5bcf7f7dd1e3c1c669912d82591397dbe24a10 (patch)
tree3b07e0f44f397e6db82da11e6807efc284d9e441 /src
parent631db1d4b251a500e22743fc3eec9fb8724baf67 (diff)
downloadpostgresql-6a5bcf7f7dd1e3c1c669912d82591397dbe24a10.tar.gz
postgresql-6a5bcf7f7dd1e3c1c669912d82591397dbe24a10.zip
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
Diffstat (limited to 'src')
-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);
}
/*