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

Commit6390c8c

Browse files
committed
Group cluster_name and update_process_title settings together
1 parentcf007a4 commit6390c8c

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
@@ -4394,30 +4394,6 @@ local0.* /var/log/postgresql
43944394
</listitem>
43954395
</varlistentry>
43964396

4397-
<varlistentry id="guc-cluster-name" xreflabel="cluster_name">
4398-
<term><varname>cluster_name</varname> (<type>string</type>)
4399-
<indexterm>
4400-
<primary><varname>cluster_name</> configuration parameter</primary>
4401-
</indexterm>
4402-
</term>
4403-
<listitem>
4404-
<para>
4405-
Sets the cluster name that appears in the process title for all
4406-
processes in this cluster. The name can be any string of less than
4407-
<symbol>NAMEDATALEN</> characters (64 characters in a standard
4408-
build). Only printable ASCII characters may be used in the
4409-
<varname>cluster_name</varname> value. Other characters will be
4410-
replaced with question marks (<literal>?</literal>). No name is shown
4411-
if this parameter is set to the empty string <literal>''</> (which is
4412-
the default). This parameter can only be set at server start.
4413-
</para>
4414-
<para>
4415-
The process title is typically viewed using programs like
4416-
<application>ps</> or, on Windows, <application>Process Explorer</>.
4417-
</para>
4418-
</listitem>
4419-
</varlistentry>
4420-
44214397
<varlistentry>
44224398
<term><varname>debug_print_parse</varname> (<type>boolean</type>)
44234399
<indexterm>
@@ -5010,9 +4986,61 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
50104986
</listitem>
50114987
</orderedlist>
50124988
</para>
5013-
50144989
</sect2>
5015-
</sect1>
4990+
4991+
<sect2>
4992+
<title>Process Title</title>
4993+
4994+
<para>
4995+
These settings control how the process title as seen
4996+
by <command>ps</command> is modified. See <xref linkend="monitoring-ps">
4997+
for details.
4998+
</para>
4999+
5000+
<variablelist>
5001+
<varlistentry id="guc-cluster-name" xreflabel="cluster_name">
5002+
<term><varname>cluster_name</varname> (<type>string</type>)
5003+
<indexterm>
5004+
<primary><varname>cluster_name</> configuration parameter</primary>
5005+
</indexterm>
5006+
</term>
5007+
<listitem>
5008+
<para>
5009+
Sets the cluster name that appears in the process title for all
5010+
processes in this cluster. The name can be any string of less than
5011+
<symbol>NAMEDATALEN</> characters (64 characters in a standard
5012+
build). Only printable ASCII characters may be used in the
5013+
<varname>cluster_name</varname> value. Other characters will be
5014+
replaced with question marks (<literal>?</literal>). No name is shown
5015+
if this parameter is set to the empty string <literal>''</> (which is
5016+
the default). This parameter can only be set at server start.
5017+
</para>
5018+
<para>
5019+
The process title is typically viewed using programs like
5020+
<application>ps</> or, on Windows, <application>Process Explorer</>.
5021+
</para>
5022+
</listitem>
5023+
</varlistentry>
5024+
5025+
<varlistentry id="guc-update-process-title" xreflabel="update_process_title">
5026+
<term><varname>update_process_title</varname> (<type>boolean</type>)
5027+
<indexterm>
5028+
<primary><varname>update_process_title</> configuration parameter</primary>
5029+
</indexterm>
5030+
</term>
5031+
<listitem>
5032+
<para>
5033+
Enables updating of the process title every time a new SQL command
5034+
is received by the server. The process title is typically viewed
5035+
by the <command>ps</> command,
5036+
or in Windows by using the <application>Process Explorer</>.
5037+
Only superusers can change this setting.
5038+
</para>
5039+
</listitem>
5040+
</varlistentry>
5041+
</variablelist>
5042+
</sect2>
5043+
</sect1>
50165044

50175045
<sect1 id="runtime-config-statistics">
50185046
<title>Run-time Statistics</title>
@@ -5130,23 +5158,6 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
51305158
</listitem>
51315159
</varlistentry>
51325160

5133-
<varlistentry id="guc-update-process-title" xreflabel="update_process_title">
5134-
<term><varname>update_process_title</varname> (<type>boolean</type>)
5135-
<indexterm>
5136-
<primary><varname>update_process_title</> configuration parameter</primary>
5137-
</indexterm>
5138-
</term>
5139-
<listitem>
5140-
<para>
5141-
Enables updating of the process title every time a new SQL command
5142-
is received by the server. The process title is typically viewed
5143-
by the <command>ps</> command,
5144-
or in Windows by using the <application>Process Explorer</>.
5145-
Only superusers can change this setting.
5146-
</para>
5147-
</listitem>
5148-
</varlistentry>
5149-
51505161
<varlistentry id="guc-stats-temp-directory" xreflabel="stats_temp_directory">
51515162
<term><varname>stats_temp_directory</varname> (<type>string</type>)
51525163
<indexterm>

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

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

11821184
{
1183-
{"update_process_title",PGC_SUSET,STATS_COLLECTOR,
1185+
{"update_process_title",PGC_SUSET,PROCESS_TITLE,
11841186
gettext_noop("Updates the process title to show the active SQL command."),
11851187
gettext_noop("Enables updating of the process title every time a new SQL command is received by the server.")
11861188
},
@@ -3395,7 +3397,7 @@ static struct config_string ConfigureNamesString[] =
33953397
},
33963398

33973399
{
3398-
{"cluster_name",PGC_POSTMASTER,LOGGING_WHAT,
3400+
{"cluster_name",PGC_POSTMASTER,PROCESS_TITLE,
33993401
gettext_noop("Sets the name of the cluster which is included in the process title."),
34003402
NULL,
34013403
GUC_IS_NAME

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,13 @@
447447
# than the specified size in kilobytes;
448448
# -1 disables, 0 logs all temp files
449449
#log_timezone = 'GMT'
450+
451+
452+
# - Process Title -
453+
450454
#cluster_name = ''# added to process titles if nonempty
451455
# (change requires restart)
456+
#update_process_title = on
452457

453458

454459
#------------------------------------------------------------------------------
@@ -462,7 +467,6 @@
462467
#track_io_timing = off
463468
#track_functions = none# none, pl, all
464469
#track_activity_query_size = 1024# (change requires restart)
465-
#update_process_title = on
466470
#stats_temp_directory = 'pg_stat_tmp'
467471

468472

‎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