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

Commit 0307c09

Browse files
committed
Rename vacuum_cost_naptime to vacuum_cost_delay, with agreement from Jan.
1 parent bdf8ef6 commit 0307c09

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

doc/src/sgml/runtime.sgml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.272 2004/08/05 23:32:10 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.273 2004/08/06 04:15:07 momjian Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -1074,7 +1074,7 @@ SET ENABLE_SEQSCAN TO OFF;
10741074
cost reaches a limit (specified by
10751075
<varname>vacuum_cost_limit</varname>), the process performing
10761076
the operation will sleep for a while (specified by
1077-
<varname>vacuum_cost_naptime</varname>). Then it will reset the
1077+
<varname>vacuum_cost_delay</varname>). Then it will reset the
10781078
counter and continue execution.
10791079
</para>
10801080

@@ -1092,7 +1092,7 @@ SET ENABLE_SEQSCAN TO OFF;
10921092

10931093
<para>
10941094
This feature is disabled by default. To enable it, set the
1095-
<varname>vacuum_cost_naptime</varname> variable to a nonzero
1095+
<varname>vacuum_cost_delay</varname> variable to a nonzero
10961096
value.
10971097
</para>
10981098

@@ -1143,8 +1143,8 @@ SET ENABLE_SEQSCAN TO OFF;
11431143
</listitem>
11441144
</varlistentry>
11451145

1146-
<varlistentry id="guc-vacuum-cost-naptime" xreflabel="vacuum_cost_naptime">
1147-
<term><varname>vacuum_cost_naptime</varname> (<type>integer</type>)</term>
1146+
<varlistentry id="guc-vacuum-cost-delay" xreflabel="vacuum_cost_delay">
1147+
<term><varname>vacuum_cost_delay</varname> (<type>integer</type>)</term>
11481148
<listitem>
11491149
<para>
11501150
The length of time, in milliseconds, that the process will nap
@@ -1153,7 +1153,7 @@ SET ENABLE_SEQSCAN TO OFF;
11531153
delay feature. Positive values enable cost-based vacuuming.
11541154
Note however that on many systems, the effective resolution
11551155
of sleep delays is 10 milliseconds; setting
1156-
<varname>vacuum_cost_naptime</varname> to a value that is
1156+
<varname>vacuum_cost_delay</varname> to a value that is
11571157
not a multiple of 10 may have the same results as setting it
11581158
to the next higher multiple of 10.
11591159
</para>
@@ -1168,10 +1168,10 @@ SET ENABLE_SEQSCAN TO OFF;
11681168
delays do not occur during such operations. Therefore it is
11691169
possible that the cost accumulates far higher than the specified
11701170
limit. To avoid uselessly long delays in such cases, the actual
1171-
naptime is calculated as <varname>vacuum_cost_naptime</varname> *
1171+
delay is calculated as <varname>vacuum_cost_delay</varname> *
11721172
<varname>accumulated_balance</varname> /
11731173
<varname>vacuum_cost_limit</varname> with a maximum of
1174-
<varname>vacuum_cost_naptime</varname> * 4.
1174+
<varname>vacuum_cost_delay</varname> * 4.
11751175
</para>
11761176
</note>
11771177

src/backend/commands/vacuum.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*
1515
* IDENTIFICATION
16-
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.285 2004/07/31 00:45:31 tgl Exp $
16+
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.286 2004/08/06 04:15:07 momjian Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -377,7 +377,7 @@ vacuum(VacuumStmt *vacstmt)
377377
{
378378
ListCell *cur;
379379

380-
VacuumCostActive = (VacuumCostNaptime > 0);
380+
VacuumCostActive = (VacuumCostDelay > 0);
381381
VacuumCostBalance = 0;
382382

383383
/*
@@ -3373,9 +3373,9 @@ vacuum_delay_point(void)
33733373
{
33743374
int msec;
33753375

3376-
msec = VacuumCostNaptime * VacuumCostBalance / VacuumCostLimit;
3377-
if (msec > VacuumCostNaptime * 4)
3378-
msec = VacuumCostNaptime * 4;
3376+
msec = VacuumCostDelay * VacuumCostBalance / VacuumCostLimit;
3377+
if (msec > VacuumCostDelay * 4)
3378+
msec = VacuumCostDelay * 4;
33793379

33803380
pg_usleep(msec * 1000L);
33813381

src/backend/po/af.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -9167,7 +9167,7 @@ msgid "Vacuum cost amount available before napping."
91679167
msgstr ""
91689168

91699169
#: utils/misc/guc.c:1097
9170-
msgid "Vacuum cost naptime in milliseconds."
9170+
msgid "Vacuum cost delay in milliseconds."
91719171
msgstr ""
91729172

91739173
#: utils/misc/guc.c:1106

src/backend/po/sv.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -9155,7 +9155,7 @@ msgid "Vacuum cost amount available before napping."
91559155
msgstr ""
91569156

91579157
#: utils/misc/guc.c:1062
9158-
msgid "Vacuum cost naptime in milliseconds."
9158+
msgid "Vacuum cost delay in milliseconds."
91599159
msgstr ""
91609160

91619161
#: utils/misc/guc.c:1071

src/backend/po/zh_TW.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -9875,7 +9875,7 @@ msgid "Vacuum cost amount available before napping."
98759875
msgstr ""
98769876

98779877
#: utils/misc/guc.c:1036
9878-
msgid "Vacuum cost naptime in milliseconds."
9878+
msgid "Vacuum cost delay in milliseconds."
98799879
msgstr ""
98809880

98819881
#: utils/misc/guc.c:1045

src/backend/utils/init/globals.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.91 2004/06/18 06:13:54 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.92 2004/08/06 04:15:09 momjian Exp $
1212
*
1313
* NOTES
1414
* Globals used all over the place should be declared here and not
@@ -96,7 +96,7 @@ int VacuumCostPageHit = 1; /* GUC parameters for vacuum */
9696
int VacuumCostPageMiss = 10;
9797
int VacuumCostPageDirty = 20;
9898
int VacuumCostLimit = 200;
99-
int VacuumCostNaptime = 0;
99+
int VacuumCostDelay = 0;
100100

101101
int VacuumCostBalance = 0; /* working state for vacuum */
102102
bool VacuumCostActive = false;

src/backend/utils/misc/guc.c

+4-4
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.226 2004/08/05 23:32:12 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.227 2004/08/06 04:15:09 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -1041,11 +1041,11 @@ static struct config_int ConfigureNamesInt[] =
10411041
},
10421042

10431043
{
1044-
{"vacuum_cost_naptime", PGC_USERSET, RESOURCES,
1045-
gettext_noop("Vacuum cost naptime in milliseconds."),
1044+
{"vacuum_cost_delay", PGC_USERSET, RESOURCES,
1045+
gettext_noop("Vacuum cost delay in milliseconds."),
10461046
NULL
10471047
},
1048-
&VacuumCostNaptime,
1048+
&VacuumCostDelay,
10491049
0, 0, 1000, NULL, NULL
10501050
},
10511051

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
#vacuum_cost_page_miss = 10 # 0-10000 credits
7575
#vacuum_cost_page_dirty = 20 # 0-10000 credits
7676
#vacuum_cost_limit = 200 # 0-10000 credits
77-
#vacuum_cost_naptime = 50 # 0-1000 milliseconds
77+
#vacuum_cost_delay = 50 # 0-1000 milliseconds
7878

7979
# - Background writer -
8080
#bgwriter_delay = 200 # 10-5000 milliseconds

src/include/miscadmin.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
16-
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.164 2004/08/01 17:32:20 tgl Exp $
16+
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.165 2004/08/06 04:15:09 momjian Exp $
1717
*
1818
* NOTES
1919
* some of the information in this file should be moved to other files.
@@ -208,7 +208,7 @@ extern int VacuumCostPageHit;
208208
extern int VacuumCostPageMiss;
209209
extern int VacuumCostPageDirty;
210210
extern int VacuumCostLimit;
211-
extern int VacuumCostNaptime;
211+
extern int VacuumCostDelay;
212212

213213
extern int VacuumCostBalance;
214214
extern bool VacuumCostActive;

0 commit comments

Comments
 (0)