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

Commit0307c09

Browse files
committed
Rename vacuum_cost_naptime to vacuum_cost_delay, with agreement from Jan.
1 parentbdf8ef6 commit0307c09

File tree

9 files changed

+25
-25
lines changed

9 files changed

+25
-25
lines changed

‎doc/src/sgml/runtime.sgml

Lines changed: 8 additions & 8 deletions
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

Lines changed: 5 additions & 5 deletions
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
intmsec;
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

Lines changed: 1 addition & 1 deletion
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 costnaptime in milliseconds."
9170+
msgid"Vacuum costdelay in milliseconds."
91719171
msgstr""
91729172

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

‎src/backend/po/sv.po

Lines changed: 1 addition & 1 deletion
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 costnaptime in milliseconds."
9158+
msgid"Vacuum costdelay in milliseconds."
91599159
msgstr""
91609160

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

‎src/backend/po/zh_TW.po

Lines changed: 1 addition & 1 deletion
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 costnaptime in milliseconds."
9878+
msgid"Vacuum costdelay in milliseconds."
98799879
msgstr""
98809880

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

‎src/backend/utils/init/globals.c

Lines changed: 2 additions & 2 deletions
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 @@ intVacuumCostPageHit = 1;/* GUC parameters for vacuum */
9696
intVacuumCostPageMiss=10;
9797
intVacuumCostPageDirty=20;
9898
intVacuumCostLimit=200;
99-
intVacuumCostNaptime=0;
99+
intVacuumCostDelay=0;
100100

101101
intVacuumCostBalance=0;/* working state for vacuum */
102102
boolVacuumCostActive= false;

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

Lines changed: 4 additions & 4 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.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 costnaptime in milliseconds."),
1044+
{"vacuum_cost_delay",PGC_USERSET,RESOURCES,
1045+
gettext_noop("Vacuum costdelay in milliseconds."),
10461046
NULL
10471047
},
1048-
&VacuumCostNaptime,
1048+
&VacuumCostDelay,
10491049
0,0,1000,NULL,NULL
10501050
},
10511051

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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 intVacuumCostPageHit;
208208
externintVacuumCostPageMiss;
209209
externintVacuumCostPageDirty;
210210
externintVacuumCostLimit;
211-
externintVacuumCostNaptime;
211+
externintVacuumCostDelay;
212212

213213
externintVacuumCostBalance;
214214
externboolVacuumCostActive;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp