aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2016-08-17 10:39:22 +0200
committerMagnus Hagander <magnus@hagander.net>2016-08-17 10:43:55 +0200
commit9b33c7e80d5ac9d85cbb9330f172a5e606876b1c (patch)
tree07468beb202f26994f74782144bf7d8ee90f43ae /src
parentdd028e904c67dae5f5d51da73628a8bd3cb1f5f1 (diff)
downloadpostgresql-9b33c7e80d5ac9d85cbb9330f172a5e606876b1c.tar.gz
postgresql-9b33c7e80d5ac9d85cbb9330f172a5e606876b1c.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/misc/guc.c4
-rw-r--r--src/bin/initdb/initdb.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 0a58ba1faeb..31172ef3007 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);