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

Commit c0a9283

Browse files
committed
Rename collect_* options to more user-friendly names.
1 parent 9e60c0f commit c0a9283

File tree

3 files changed

+94
-94
lines changed

3 files changed

+94
-94
lines changed

doc/src/sgml/runtime.sgml

+83-83
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.84 2001/09/21 20:31:43 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.85 2001/09/23 21:52:36 petere Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -780,45 +780,6 @@ env PGOPTIONS='-c geqo=off' psql
780780

781781
<para>
782782
<variablelist>
783-
<varlistentry>
784-
<term><varname>COLLECT_STARTCOLLECTOR</varname> (<type>boolean</type>)</term>
785-
<listitem>
786-
<para>
787-
Controls whether the postmaster should start the statistics-collection
788-
subprocess. This is on by default, but may be turned off if you
789-
know you have no interest in collecting statistics. This option
790-
can only be set at postmaster start.
791-
</para>
792-
</listitem>
793-
</varlistentry>
794-
795-
<varlistentry>
796-
<term><varname>COLLECT_RESETONPMSTART</varname> (<type>boolean</type>)</term>
797-
<listitem>
798-
<para>
799-
If on, collected statistics are zeroed out whenever the postmaster
800-
is restarted. If off, statistics are accumulated across postmaster
801-
restarts. The default is on. This option
802-
can only be set at postmaster start.
803-
</para>
804-
</listitem>
805-
</varlistentry>
806-
807-
<varlistentry>
808-
<term><varname>COLLECT_QUERYSTRING</varname> (<type>boolean</type>)</term>
809-
<term><varname>COLLECT_BLOCKLEVEL</varname> (<type>boolean</type>)</term>
810-
<term><varname>COLLECT_TUPLELEVEL</varname> (<type>boolean</type>)</term>
811-
<listitem>
812-
<para>
813-
These flags determine what information backends send to the statistics
814-
collector process: current queries, block-level activity statistics,
815-
or tuple-level activity statistics. All default to off. Enabling
816-
statistics collection costs a small amount of time per query, but
817-
is invaluable for debugging and performance tuning.
818-
</para>
819-
</listitem>
820-
</varlistentry>
821-
822783
<varlistentry>
823784
<term><varname>DEBUG_ASSERTIONS</varname> (<type>boolean</type>)</term>
824785
<listitem>
@@ -940,6 +901,45 @@ env PGOPTIONS='-c geqo=off' psql
940901
</listitem>
941902
</varlistentry>
942903

904+
<varlistentry>
905+
<term><varname>STATS_COMMAND_STRING</varname> (<type>boolean</type>)</term>
906+
<term><varname>STATS_BLOCK_LEVEL</varname> (<type>boolean</type>)</term>
907+
<term><varname>STATS_ROW_LEVEL</varname> (<type>boolean</type>)</term>
908+
<listitem>
909+
<para>
910+
These flags determine what information backends send to the statistics
911+
collector process: current commands, block-level activity statistics,
912+
or row-level activity statistics. All default to off. Enabling
913+
statistics collection costs a small amount of time per query, but
914+
is invaluable for debugging and performance tuning.
915+
</para>
916+
</listitem>
917+
</varlistentry>
918+
919+
<varlistentry>
920+
<term><varname>STATS_RESET_ON_SERVER_START</varname> (<type>boolean</type>)</term>
921+
<listitem>
922+
<para>
923+
If on, collected statistics are zeroed out whenever the server
924+
is restarted. If off, statistics are accumulated across server
925+
restarts. The default is on. This option
926+
can only be set at server start.
927+
</para>
928+
</listitem>
929+
</varlistentry>
930+
931+
<varlistentry>
932+
<term><varname>STATS_START_COLLECTOR</varname> (<type>boolean</type>)</term>
933+
<listitem>
934+
<para>
935+
Controls whether the server should start the statistics-collection
936+
subprocess. This is on by default, but may be turned off if you
937+
know you have no interest in collecting statistics. This option
938+
can only be set at server start.
939+
</para>
940+
</listitem>
941+
</varlistentry>
942+
943943
<varlistentry>
944944
<term><varname>SYSLOG</varname> (<type>integer</type>)</term>
945945
<listitem>
@@ -1268,49 +1268,6 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
12681268
</listitem>
12691269
</varlistentry>
12701270

1271-
<varlistentry>
1272-
<term><varname>TRANSFORM_NULL_EQUALS</varname> (<type>boolean</type>)</term>
1273-
<listitem>
1274-
<para>
1275-
When turned on, expressions of the form
1276-
<literal><replaceable>expr</> = NULL</literal> (or
1277-
<literal>NULL = <replaceable>expr</></literal>) are treated as
1278-
<literal><replaceable>expr</> IS NULL</literal>, that is, they
1279-
return true if <replaceable>expr</> evaluates to the NULL
1280-
value, and false otherwise. The correct behavior of
1281-
<literal><replaceable>expr</> = NULL</literal> is to always
1282-
return NULL (unknown). Therefore this option defaults to off.
1283-
</para>
1284-
1285-
<para>
1286-
However, filtered forms in <productname>Microsoft
1287-
Access</productname> generate queries that appear to use
1288-
<literal><replaceable>expr</> = NULL</literal> to test for
1289-
NULLs, so if you use that interface to access the database you
1290-
might want to turn this option on. Since expressions of the
1291-
form <literal><replaceable>expr</> = NULL</literal> always
1292-
return NULL (using the correct interpretation) they are not
1293-
very useful and do not appear often in normal applications, so
1294-
this option does little harm in practice. But new users are
1295-
frequently confused about the semantics of expressions
1296-
involving NULL, so we do not turn this option on by default.
1297-
</para>
1298-
1299-
<para>
1300-
Note that this option only affects the literal <literal>=</>
1301-
operator, not other comparison operators or other expressions
1302-
that are computationally equivalent to some expression
1303-
involving the equals operator (such as <literal>IN</literal>).
1304-
Thus, this option is not a general fix for bad programming.
1305-
</para>
1306-
1307-
<para>
1308-
Refer to the <citetitle>User's Guide</citetitle> for related
1309-
information.
1310-
</para>
1311-
</listitem>
1312-
</varlistentry>
1313-
13141271
<varlistentry>
13151272
<term><varname>PORT</varname> (<type>integer</type>)</term>
13161273
<listitem>
@@ -1408,6 +1365,49 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
14081365
</listitem>
14091366
</varlistentry>
14101367

1368+
<varlistentry>
1369+
<term><varname>TRANSFORM_NULL_EQUALS</varname> (<type>boolean</type>)</term>
1370+
<listitem>
1371+
<para>
1372+
When turned on, expressions of the form
1373+
<literal><replaceable>expr</> = NULL</literal> (or
1374+
<literal>NULL = <replaceable>expr</></literal>) are treated as
1375+
<literal><replaceable>expr</> IS NULL</literal>, that is, they
1376+
return true if <replaceable>expr</> evaluates to the NULL
1377+
value, and false otherwise. The correct behavior of
1378+
<literal><replaceable>expr</> = NULL</literal> is to always
1379+
return NULL (unknown). Therefore this option defaults to off.
1380+
</para>
1381+
1382+
<para>
1383+
However, filtered forms in <productname>Microsoft
1384+
Access</productname> generate queries that appear to use
1385+
<literal><replaceable>expr</> = NULL</literal> to test for
1386+
NULLs, so if you use that interface to access the database you
1387+
might want to turn this option on. Since expressions of the
1388+
form <literal><replaceable>expr</> = NULL</literal> always
1389+
return NULL (using the correct interpretation) they are not
1390+
very useful and do not appear often in normal applications, so
1391+
this option does little harm in practice. But new users are
1392+
frequently confused about the semantics of expressions
1393+
involving NULL, so we do not turn this option on by default.
1394+
</para>
1395+
1396+
<para>
1397+
Note that this option only affects the literal <literal>=</>
1398+
operator, not other comparison operators or other expressions
1399+
that are computationally equivalent to some expression
1400+
involving the equals operator (such as <literal>IN</literal>).
1401+
Thus, this option is not a general fix for bad programming.
1402+
</para>
1403+
1404+
<para>
1405+
Refer to the <citetitle>User's Guide</citetitle> for related
1406+
information.
1407+
</para>
1408+
</listitem>
1409+
</varlistentry>
1410+
14111411
<varlistentry>
14121412
<term><varname>UNIX_SOCKET_DIRECTORY</varname> (<type>string</type>)</term>
14131413
<listitem>

src/backend/utils/misc/guc.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Support for grand unified configuration scheme, including SET
55
* command, configuration file, and command line options.
66
*
7-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.51 2001/09/21 17:06:12 tgl Exp $
7+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.52 2001/09/23 21:52:36 petere Exp $
88
*
99
* Copyright 2000 by PostgreSQL Global Development Group
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
@@ -229,11 +229,11 @@ static struct config_bool
229229
{"show_btree_build_stats", PGC_SUSET, &Show_btree_build_stats, false, NULL},
230230
#endif
231231

232-
{"collect_startcollector", PGC_POSTMASTER, &pgstat_collect_startcollector, true, NULL},
233-
{"collect_resetonpmstart", PGC_POSTMASTER, &pgstat_collect_resetonpmstart, true, NULL},
234-
{"collect_querystring", PGC_SUSET, &pgstat_collect_querystring, false, NULL},
235-
{"collect_tuplelevel", PGC_SUSET, &pgstat_collect_tuplelevel, false, NULL},
236-
{"collect_blocklevel", PGC_SUSET, &pgstat_collect_blocklevel, false, NULL},
232+
{"stats_start_collector", PGC_POSTMASTER, &pgstat_collect_startcollector, true, NULL},
233+
{"stats_reset_on_server_start", PGC_POSTMASTER, &pgstat_collect_resetonpmstart, true, NULL},
234+
{"stats_command_string", PGC_SUSET, &pgstat_collect_querystring, false, NULL},
235+
{"stats_row_level", PGC_SUSET, &pgstat_collect_tuplelevel, false, NULL},
236+
{"stats_block_level", PGC_SUSET, &pgstat_collect_blocklevel, false, NULL},
237237

238238
{"trace_notify", PGC_USERSET, &Trace_notify, false, NULL},
239239

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@
150150
#
151151
# Access statistics collection
152152
#
153-
#collect_startcollector = true
154-
#collect_resetonpmstart = true
155-
#collect_querystring = false
156-
#collect_tuplelevel = false
157-
#collect_blocklevel = false
153+
#stats_start_collector = true
154+
#stats_reset_on_server_start = true
155+
#stats_command_string = false
156+
#stats_row_level = false
157+
#stats_block_level = false
158158

159159

160160
#

0 commit comments

Comments
 (0)