Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9b33c7e

Browse files
committed
Disable update_process_title by default on Windows
The performance overhead of this can be significant on Windows, and most people don't have the tools to view it anyway as Windows does not have native support for process titles. Discussion: <0A3221C70F24FB45833433255569204D1F5BE3E8@G01JPEXMBYT05> Takayuki Tsunakawa
1 parent dd028e9 commit 9b33c7e

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

doc/src/sgml/config.sgml

+2
Original file line numberDiff line numberDiff line change
@@ -5430,6 +5430,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
54305430
is received by the server. The process title is typically viewed
54315431
by the <command>ps</> command,
54325432
or in Windows by using the <application>Process Explorer</>.
5433+
This value defaults to off on Windows platforms due to the
5434+
platform's significant overhead for updating the process title.
54335435
Only superusers can change this setting.
54345436
</para>
54355437
</listitem>

src/backend/utils/misc/guc.c

+4
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,11 @@ static struct config_bool ConfigureNamesBool[] =
12101210
gettext_noop("Enables updating of the process title every time a new SQL command is received by the server.")
12111211
},
12121212
&update_process_title,
1213+
#ifdef WIN32
1214+
false,
1215+
#else
12131216
true,
1217+
#endif
12141218
NULL, NULL, NULL
12151219
},
12161220

src/bin/initdb/initdb.c

+6
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,12 @@ setup_config(void)
12921292
"#effective_io_concurrency = 0");
12931293
#endif
12941294

1295+
#ifdef WIN32
1296+
conflines = replace_token(conflines,
1297+
"#update_process_title = on",
1298+
"#update_process_title = off");
1299+
#endif
1300+
12951301
snprintf(path, sizeof(path), "%s/postgresql.conf", pg_data);
12961302

12971303
writefile(path, conflines);

0 commit comments

Comments
 (0)