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

Commit41f302b

Browse files
committed
Add new GUC categories corresponding to sections in docs, and move
description for vacuum_defer_cleanup_age to the correct category.Sections in postgresql.conf are also sorted in the same order with docs.Per gripe by Fujii Masao, suggestion by Heikki Linnakangas, and patch by me.
1 parent8141523 commit41f302b

File tree

4 files changed

+66
-51
lines changed

4 files changed

+66
-51
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.280 2010/05/31 15:50:48 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.281 2010/06/15 07:52:10 itagaki Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -1966,6 +1966,29 @@ SET ENABLE_SEQSCAN TO OFF;
19661966
</listitem>
19671967
</varlistentry>
19681968

1969+
<varlistentry id="guc-vacuum-defer-cleanup-age" xreflabel="vacuum_defer_cleanup_age">
1970+
<term><varname>vacuum_defer_cleanup_age</varname> (<type>integer</type>)</term>
1971+
<indexterm>
1972+
<primary><varname>vacuum_defer_cleanup_age</> configuration parameter</primary>
1973+
</indexterm>
1974+
<listitem>
1975+
<para>
1976+
Specifies the number of transactions by which <command>VACUUM</> and
1977+
<acronym>HOT</> updates will defer cleanup of dead row versions. The
1978+
default is 0 transactions, meaning that dead row versions will be
1979+
removed as soon as possible. You may wish to set this to a non-zero
1980+
value when planning or maintaining a <xref linkend="hot-standby">
1981+
configuration. The recommended value is <literal>0</> unless you have
1982+
clear reason to increase it. The purpose of the parameter is to
1983+
allow the user to specify an approximate time delay before cleanup
1984+
occurs. However, it should be noted that there is no direct link with
1985+
any specific time delay and so the results will be application and
1986+
installation specific, as well as variable over time, depending upon
1987+
the transaction rate (of writes only).
1988+
</para>
1989+
</listitem>
1990+
</varlistentry>
1991+
19691992
</variablelist>
19701993
</sect2>
19711994
</sect1>
@@ -4407,29 +4430,6 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
44074430
</listitem>
44084431
</varlistentry>
44094432

4410-
<varlistentry id="guc-vacuum-defer-cleanup-age" xreflabel="vacuum_defer_cleanup_age">
4411-
<term><varname>vacuum_defer_cleanup_age</varname> (<type>integer</type>)</term>
4412-
<indexterm>
4413-
<primary><varname>vacuum_defer_cleanup_age</> configuration parameter</primary>
4414-
</indexterm>
4415-
<listitem>
4416-
<para>
4417-
Specifies the number of transactions by which <command>VACUUM</> and
4418-
<acronym>HOT</> updates will defer cleanup of dead row versions. The
4419-
default is 0 transactions, meaning that dead row versions will be
4420-
removed as soon as possible. You may wish to set this to a non-zero
4421-
value when planning or maintaining a <xref linkend="hot-standby">
4422-
configuration. The recommended value is <literal>0</> unless you have
4423-
clear reason to increase it. The purpose of the parameter is to
4424-
allow the user to specify an approximate time delay before cleanup
4425-
occurs. However, it should be noted that there is no direct link with
4426-
any specific time delay and so the results will be application and
4427-
installation specific, as well as variable over time, depending upon
4428-
the transaction rate (of writes only).
4429-
</para>
4430-
</listitem>
4431-
</varlistentry>
4432-
44334433
<varlistentry id="guc-bytea-output" xreflabel="bytea_output">
44344434
<term><varname>bytea_output</varname> (<type>enum</type>)</term>
44354435
<indexterm>

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

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.554 2010/05/02 02:10:33 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.555 2010/06/15 07:52:10 itagaki Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -489,14 +489,24 @@ const char *const config_group_names[] =
489489
gettext_noop("Resource Usage / Memory"),
490490
/* RESOURCES_KERNEL */
491491
gettext_noop("Resource Usage / Kernel Resources"),
492+
/* RESOURCES_VACUUM_DELAY */
493+
gettext_noop("Resource Usage / Cost-Based Vacuum Delay"),
494+
/* RESOURCES_BGWRITER */
495+
gettext_noop("Resource Usage / Background Writer"),
496+
/* RESOURCES_ASYNCHRONOUS */
497+
gettext_noop("Resource Usage / Asynchronous Behavior"),
492498
/* WAL */
493499
gettext_noop("Write-Ahead Log"),
494500
/* WAL_SETTINGS */
495501
gettext_noop("Write-Ahead Log / Settings"),
496502
/* WAL_CHECKPOINTS */
497503
gettext_noop("Write-Ahead Log / Checkpoints"),
504+
/* WAL_ARCHIVING */
505+
gettext_noop("Write-Ahead Log / Archiving"),
498506
/* WAL_REPLICATION */
499-
gettext_noop("Write-Ahead Log / Replication"),
507+
gettext_noop("Write-Ahead Log / Streaming Replication"),
508+
/* WAL_STANDBY_SERVERS */
509+
gettext_noop("Write-Ahead Log / Standby Servers"),
500510
/* QUERY_TUNING */
501511
gettext_noop("Query Tuning"),
502512
/* QUERY_TUNING_METHOD */
@@ -1213,7 +1223,7 @@ static struct config_bool ConfigureNamesBool[] =
12131223
},
12141224

12151225
{
1216-
{"archive_mode",PGC_POSTMASTER,WAL_SETTINGS,
1226+
{"archive_mode",PGC_POSTMASTER,WAL_ARCHIVING,
12171227
gettext_noop("Allows archiving of WAL files using archive_command."),
12181228
NULL
12191229
},
@@ -1222,7 +1232,7 @@ static struct config_bool ConfigureNamesBool[] =
12221232
},
12231233

12241234
{
1225-
{"hot_standby",PGC_POSTMASTER,WAL_SETTINGS,
1235+
{"hot_standby",PGC_POSTMASTER,WAL_STANDBY_SERVERS,
12261236
gettext_noop("Allows connections and queries during recovery."),
12271237
NULL
12281238
},
@@ -1271,7 +1281,7 @@ static struct config_bool ConfigureNamesBool[] =
12711281
staticstructconfig_intConfigureNamesInt[]=
12721282
{
12731283
{
1274-
{"archive_timeout",PGC_SIGHUP,WAL_SETTINGS,
1284+
{"archive_timeout",PGC_SIGHUP,WAL_ARCHIVING,
12751285
gettext_noop("Forces a switch to the next xlog file if a "
12761286
"new file has not been started within N seconds."),
12771287
NULL,
@@ -1384,7 +1394,7 @@ static struct config_int ConfigureNamesInt[] =
13841394
},
13851395

13861396
{
1387-
{"max_standby_delay",PGC_SIGHUP,WAL_SETTINGS,
1397+
{"max_standby_delay",PGC_SIGHUP,WAL_STANDBY_SERVERS,
13881398
gettext_noop("Sets the maximum delay to avoid conflict processing on hot standby servers."),
13891399
NULL,
13901400
GUC_UNIT_MS
@@ -1477,7 +1487,7 @@ static struct config_int ConfigureNamesInt[] =
14771487
},
14781488

14791489
{
1480-
{"vacuum_cost_page_hit",PGC_USERSET,RESOURCES,
1490+
{"vacuum_cost_page_hit",PGC_USERSET,RESOURCES_VACUUM_DELAY,
14811491
gettext_noop("Vacuum cost for a page found in the buffer cache."),
14821492
NULL
14831493
},
@@ -1486,7 +1496,7 @@ static struct config_int ConfigureNamesInt[] =
14861496
},
14871497

14881498
{
1489-
{"vacuum_cost_page_miss",PGC_USERSET,RESOURCES,
1499+
{"vacuum_cost_page_miss",PGC_USERSET,RESOURCES_VACUUM_DELAY,
14901500
gettext_noop("Vacuum cost for a page not found in the buffer cache."),
14911501
NULL
14921502
},
@@ -1495,7 +1505,7 @@ static struct config_int ConfigureNamesInt[] =
14951505
},
14961506

14971507
{
1498-
{"vacuum_cost_page_dirty",PGC_USERSET,RESOURCES,
1508+
{"vacuum_cost_page_dirty",PGC_USERSET,RESOURCES_VACUUM_DELAY,
14991509
gettext_noop("Vacuum cost for a page dirtied by vacuum."),
15001510
NULL
15011511
},
@@ -1504,7 +1514,7 @@ static struct config_int ConfigureNamesInt[] =
15041514
},
15051515

15061516
{
1507-
{"vacuum_cost_limit",PGC_USERSET,RESOURCES,
1517+
{"vacuum_cost_limit",PGC_USERSET,RESOURCES_VACUUM_DELAY,
15081518
gettext_noop("Vacuum cost amount available before napping."),
15091519
NULL
15101520
},
@@ -1513,7 +1523,7 @@ static struct config_int ConfigureNamesInt[] =
15131523
},
15141524

15151525
{
1516-
{"vacuum_cost_delay",PGC_USERSET,RESOURCES,
1526+
{"vacuum_cost_delay",PGC_USERSET,RESOURCES_VACUUM_DELAY,
15171527
gettext_noop("Vacuum cost delay in milliseconds."),
15181528
NULL,
15191529
GUC_UNIT_MS
@@ -1554,7 +1564,7 @@ static struct config_int ConfigureNamesInt[] =
15541564
* See also CheckRequiredParameterValues() if this parameter changes
15551565
*/
15561566
{
1557-
{"max_prepared_transactions",PGC_POSTMASTER,RESOURCES,
1567+
{"max_prepared_transactions",PGC_POSTMASTER,RESOURCES_MEM,
15581568
gettext_noop("Sets the maximum number of simultaneously prepared transactions."),
15591569
NULL
15601570
},
@@ -1612,7 +1622,7 @@ static struct config_int ConfigureNamesInt[] =
16121622
},
16131623

16141624
{
1615-
{"vacuum_defer_cleanup_age",PGC_USERSET,CLIENT_CONN_STATEMENT,
1625+
{"vacuum_defer_cleanup_age",PGC_USERSET,WAL_STANDBY_SERVERS,
16161626
gettext_noop("Age by which VACUUM and HOT cleanup should be deferred, if any."),
16171627
NULL
16181628
},
@@ -1790,7 +1800,7 @@ static struct config_int ConfigureNamesInt[] =
17901800
},
17911801

17921802
{
1793-
{"bgwriter_delay",PGC_SIGHUP,RESOURCES,
1803+
{"bgwriter_delay",PGC_SIGHUP,RESOURCES_BGWRITER,
17941804
gettext_noop("Background writer sleep time between rounds."),
17951805
NULL,
17961806
GUC_UNIT_MS
@@ -1800,7 +1810,7 @@ static struct config_int ConfigureNamesInt[] =
18001810
},
18011811

18021812
{
1803-
{"bgwriter_lru_maxpages",PGC_SIGHUP,RESOURCES,
1813+
{"bgwriter_lru_maxpages",PGC_SIGHUP,RESOURCES_BGWRITER,
18041814
gettext_noop("Background writer maximum number of LRU pages to flush per round."),
18051815
NULL
18061816
},
@@ -1815,7 +1825,7 @@ static struct config_int ConfigureNamesInt[] =
18151825
#else
18161826
PGC_INTERNAL,
18171827
#endif
1818-
RESOURCES,
1828+
RESOURCES_ASYNCHRONOUS,
18191829
gettext_noop("Number of simultaneous requests that can be handled efficiently by the disk subsystem."),
18201830
gettext_noop("For RAID arrays, this should be approximately the number of drive spindles in the array.")
18211831
},
@@ -2143,7 +2153,7 @@ static struct config_real ConfigureNamesReal[] =
21432153
},
21442154

21452155
{
2146-
{"bgwriter_lru_multiplier",PGC_SIGHUP,RESOURCES,
2156+
{"bgwriter_lru_multiplier",PGC_SIGHUP,RESOURCES_BGWRITER,
21472157
gettext_noop("Multiple of the average buffer usage to free per round."),
21482158
NULL
21492159
},
@@ -2197,7 +2207,7 @@ static struct config_real ConfigureNamesReal[] =
21972207
staticstructconfig_stringConfigureNamesString[]=
21982208
{
21992209
{
2200-
{"archive_command",PGC_SIGHUP,WAL_SETTINGS,
2210+
{"archive_command",PGC_SIGHUP,WAL_ARCHIVING,
22012211
gettext_noop("Sets the shell command that will be called to archive a WAL file."),
22022212
NULL
22032213
},
@@ -2630,7 +2640,7 @@ static struct config_string ConfigureNamesString[] =
26302640
#endif/* USE_SSL */
26312641

26322642
{
2633-
{"application_name",PGC_USERSET,LOGGING,
2643+
{"application_name",PGC_USERSET,LOGGING_WHAT,
26342644
gettext_noop("Sets the application name to be reported in statistics and logs."),
26352645
NULL,
26362646
GUC_IS_NAME |GUC_REPORT |GUC_NOT_IN_SAMPLE

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,19 +183,19 @@
183183
#archive_timeout = 0# force a logfile segment switch after this
184184
# number of seconds; 0 disables
185185

186-
# - Hot Standby -
186+
# - Streaming Replication -
187+
188+
#max_wal_senders = 0# max number of walsender processes
189+
#wal_sender_delay = 200ms# 1-10000 milliseconds
190+
#wal_keep_segments = 0# in logfile segments, 16MB each; 0 disables
191+
192+
# - Standby Servers -
187193

188194
#hot_standby = off# allows queries during recovery
189195
#max_standby_delay = 30s# max acceptable lag to allow queries to
190196
# complete without conflict; -1 means forever
191197
#vacuum_defer_cleanup_age = 0# num transactions by which cleanup is deferred
192198

193-
# - Replication -
194-
195-
#max_wal_senders = 0# max number of walsender processes
196-
#wal_sender_delay = 200ms# 1-10000 milliseconds
197-
#wal_keep_segments = 0# in logfile segments, 16MB each; 0 disables
198-
199199

200200
#------------------------------------------------------------------------------
201201
# QUERY TUNING

‎src/include/utils/guc_tables.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
99
*
10-
* $PostgreSQL: pgsql/src/include/utils/guc_tables.h,v 1.48 2010/01/1509:19:09 heikki Exp $
10+
* $PostgreSQL: pgsql/src/include/utils/guc_tables.h,v 1.49 2010/06/1507:52:11 itagaki Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -50,10 +50,15 @@ enum config_group
5050
RESOURCES,
5151
RESOURCES_MEM,
5252
RESOURCES_KERNEL,
53+
RESOURCES_VACUUM_DELAY,
54+
RESOURCES_BGWRITER,
55+
RESOURCES_ASYNCHRONOUS,
5356
WAL,
5457
WAL_SETTINGS,
5558
WAL_CHECKPOINTS,
59+
WAL_ARCHIVING,
5660
WAL_REPLICATION,
61+
WAL_STANDBY_SERVERS,
5762
QUERY_TUNING,
5863
QUERY_TUNING_METHOD,
5964
QUERY_TUNING_COST,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp