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

Commite45f8f8

Browse files
committed
Group cluster_name and update_process_title settings together
1 parent4365d9c commite45f8f8

File tree

4 files changed

+64
-46
lines changed

4 files changed

+64
-46
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 54 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4345,30 +4345,6 @@ local0.* /var/log/postgresql
43454345
</listitem>
43464346
</varlistentry>
43474347

4348-
<varlistentry id="guc-cluster-name" xreflabel="cluster_name">
4349-
<term><varname>cluster_name</varname> (<type>string</type>)
4350-
<indexterm>
4351-
<primary><varname>cluster_name</> configuration parameter</primary>
4352-
</indexterm>
4353-
</term>
4354-
<listitem>
4355-
<para>
4356-
Sets the cluster name that appears in the process title for all
4357-
processes in this cluster. The name can be any string of less than
4358-
<symbol>NAMEDATALEN</> characters (64 characters in a standard
4359-
build). Only printable ASCII characters may be used in the
4360-
<varname>cluster_name</varname> value. Other characters will be
4361-
replaced with question marks (<literal>?</literal>). No name is shown
4362-
if this parameter is set to the empty string <literal>''</> (which is
4363-
the default). This parameter can only be set at server start.
4364-
</para>
4365-
<para>
4366-
The process title is typically viewed using programs like
4367-
<application>ps</> or, on Windows, <application>Process Explorer</>.
4368-
</para>
4369-
</listitem>
4370-
</varlistentry>
4371-
43724348
<varlistentry>
43734349
<term><varname>debug_print_parse</varname> (<type>boolean</type>)
43744350
<indexterm>
@@ -4956,9 +4932,61 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
49564932
</listitem>
49574933
</orderedlist>
49584934
</para>
4959-
49604935
</sect2>
4961-
</sect1>
4936+
4937+
<sect2>
4938+
<title>Process Title</title>
4939+
4940+
<para>
4941+
These settings control how the process title as seen
4942+
by <command>ps</command> is modified. See <xref linkend="monitoring-ps">
4943+
for details.
4944+
</para>
4945+
4946+
<variablelist>
4947+
<varlistentry id="guc-cluster-name" xreflabel="cluster_name">
4948+
<term><varname>cluster_name</varname> (<type>string</type>)
4949+
<indexterm>
4950+
<primary><varname>cluster_name</> configuration parameter</primary>
4951+
</indexterm>
4952+
</term>
4953+
<listitem>
4954+
<para>
4955+
Sets the cluster name that appears in the process title for all
4956+
processes in this cluster. The name can be any string of less than
4957+
<symbol>NAMEDATALEN</> characters (64 characters in a standard
4958+
build). Only printable ASCII characters may be used in the
4959+
<varname>cluster_name</varname> value. Other characters will be
4960+
replaced with question marks (<literal>?</literal>). No name is shown
4961+
if this parameter is set to the empty string <literal>''</> (which is
4962+
the default). This parameter can only be set at server start.
4963+
</para>
4964+
<para>
4965+
The process title is typically viewed using programs like
4966+
<application>ps</> or, on Windows, <application>Process Explorer</>.
4967+
</para>
4968+
</listitem>
4969+
</varlistentry>
4970+
4971+
<varlistentry id="guc-update-process-title" xreflabel="update_process_title">
4972+
<term><varname>update_process_title</varname> (<type>boolean</type>)
4973+
<indexterm>
4974+
<primary><varname>update_process_title</> configuration parameter</primary>
4975+
</indexterm>
4976+
</term>
4977+
<listitem>
4978+
<para>
4979+
Enables updating of the process title every time a new SQL command
4980+
is received by the server. The process title is typically viewed
4981+
by the <command>ps</> command,
4982+
or in Windows by using the <application>Process Explorer</>.
4983+
Only superusers can change this setting.
4984+
</para>
4985+
</listitem>
4986+
</varlistentry>
4987+
</variablelist>
4988+
</sect2>
4989+
</sect1>
49624990

49634991
<sect1 id="runtime-config-statistics">
49644992
<title>Run-time Statistics</title>
@@ -5076,23 +5104,6 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
50765104
</listitem>
50775105
</varlistentry>
50785106

5079-
<varlistentry id="guc-update-process-title" xreflabel="update_process_title">
5080-
<term><varname>update_process_title</varname> (<type>boolean</type>)
5081-
<indexterm>
5082-
<primary><varname>update_process_title</> configuration parameter</primary>
5083-
</indexterm>
5084-
</term>
5085-
<listitem>
5086-
<para>
5087-
Enables updating of the process title every time a new SQL command
5088-
is received by the server. The process title is typically viewed
5089-
by the <command>ps</> command,
5090-
or in Windows by using the <application>Process Explorer</>.
5091-
Only superusers can change this setting.
5092-
</para>
5093-
</listitem>
5094-
</varlistentry>
5095-
50965107
<varlistentry id="guc-stats-temp-directory" xreflabel="stats_temp_directory">
50975108
<term><varname>stats_temp_directory</varname> (<type>string</type>)
50985109
<indexterm>

‎src/backend/utils/misc/guc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ const char *const config_group_names[] =
581581
gettext_noop("Reporting and Logging / When to Log"),
582582
/* LOGGING_WHAT */
583583
gettext_noop("Reporting and Logging / What to Log"),
584+
/* PROCESS_TITLE */
585+
gettext_noop("Process Title"),
584586
/* STATS */
585587
gettext_noop("Statistics"),
586588
/* STATS_MONITORING */
@@ -1181,7 +1183,7 @@ static struct config_bool ConfigureNamesBool[] =
11811183
},
11821184

11831185
{
1184-
{"update_process_title",PGC_SUSET,STATS_COLLECTOR,
1186+
{"update_process_title",PGC_SUSET,PROCESS_TITLE,
11851187
gettext_noop("Updates the process title to show the active SQL command."),
11861188
gettext_noop("Enables updating of the process title every time a new SQL command is received by the server.")
11871189
},
@@ -3366,7 +3368,7 @@ static struct config_string ConfigureNamesString[] =
33663368
},
33673369

33683370
{
3369-
{"cluster_name",PGC_POSTMASTER,LOGGING_WHAT,
3371+
{"cluster_name",PGC_POSTMASTER,PROCESS_TITLE,
33703372
gettext_noop("Sets the name of the cluster which is included in the process title."),
33713373
NULL,
33723374
GUC_IS_NAME

‎src/backend/utils/misc/postgresql.conf.sample

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,13 @@
443443
# than the specified size in kilobytes;
444444
# -1 disables, 0 logs all temp files
445445
#log_timezone = 'GMT'
446+
447+
448+
# - Process Title -
449+
446450
#cluster_name = ''# added to process titles if nonempty
447451
# (change requires restart)
452+
#update_process_title = on
448453

449454

450455
#------------------------------------------------------------------------------
@@ -458,7 +463,6 @@
458463
#track_io_timing = off
459464
#track_functions = none# none, pl, all
460465
#track_activity_query_size = 1024# (change requires restart)
461-
#update_process_title = on
462466
#stats_temp_directory = 'pg_stat_tmp'
463467

464468

‎src/include/utils/guc_tables.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ enum config_group
8181
LOGGING_WHERE,
8282
LOGGING_WHEN,
8383
LOGGING_WHAT,
84+
PROCESS_TITLE,
8485
STATS,
8586
STATS_MONITORING,
8687
STATS_COLLECTOR,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp