Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6a5bcf7

Browse files
committed
postmaster: Reduce verbosity of environment dump debug message
Emitting each variable separately is unnecessarily verbose / hard to skimover. Emit the whole thing in one ereport() to address that.Also remove program name and function reference from the message. The formerdoesn't seem particularly helpful and the latter is provided by the elog.cinfrastructure these days.Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>Reviewed-by: Peter Eisentraut <peter@eisentraut.org>Discussion:https://postgr.es/m/leouteo5ozcrux3fepuhtbp6c56tbfd4naxeokidbx7m75cabz@hhw6g4urlowt
1 parent631db1d commit6a5bcf7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -839,20 +839,20 @@ PostmasterMain(int argc, char *argv[])
839839
#endif
840840

841841
/* For debugging: display postmaster environment */
842+
if (message_level_is_interesting(DEBUG3))
842843
{
843844
externchar**environ;
844845
char**p;
846+
StringInfoDatasi;
845847

846-
ereport(DEBUG3,
847-
(errmsg_internal("%s: PostmasterMain: initial environment dump:",
848-
progname)));
849-
ereport(DEBUG3,
850-
(errmsg_internal("-----------------------------------------")));
848+
initStringInfo(&si);
849+
850+
appendStringInfoString(&si,"initial environment dump:");
851851
for (p=environ;*p;++p)
852-
ereport(DEBUG3,
853-
(errmsg_internal("\t%s",*p)));
854-
ereport(DEBUG3,
855-
(errmsg_internal("-----------------------------------------")));
852+
appendStringInfo(&si,"\n%s",*p);
853+
854+
ereport(DEBUG3,errmsg_internal("%s",si.data));
855+
pfree(si.data);
856856
}
857857

858858
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp