summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/config.sgml2
-rw-r--r--src/backend/utils/misc/guc.c4
-rw-r--r--src/bin/initdb/initdb.c6
3 files changed, 12 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 02f917b375e..5c8db973436 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5430,6 +5430,8 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
is received by the server. The process title is typically viewed
by the <command>ps</> command,
or in Windows by using the <application>Process Explorer</>.
+ This value defaults to off on Windows platforms due to the
+ platform's significant overhead for updating the process title.
Only superusers can change this setting.
</para>
</listitem>
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 9c93df0f0a4..c5178f7cadf 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1210,7 +1210,11 @@ static struct config_bool ConfigureNamesBool[] =
gettext_noop("Enables updating of the process title every time a new SQL command is received by the server.")
},
&update_process_title,
+#ifdef WIN32
+ false,
+#else
true,
+#endif
NULL, NULL, NULL
},
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 73cb7ee683d..a978bbc328a 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -1292,6 +1292,12 @@ setup_config(void)
"#effective_io_concurrency = 0");
#endif
+#ifdef WIN32
+ conflines = replace_token(conflines,
+ "#update_process_title = on",
+ "#update_process_title = off");
+#endif
+
snprintf(path, sizeof(path), "%s/postgresql.conf", pg_data);
writefile(path, conflines);