mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Rename vacuum_cost_naptime to vacuum_cost_delay, with agreement from Jan.
This commit is contained in:
parent
bdf8ef6925
commit
0307c09cf5
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.272 2004/08/05 23:32:10 tgl Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.273 2004/08/06 04:15:07 momjian Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Chapter Id="runtime">
|
<Chapter Id="runtime">
|
||||||
@ -1074,7 +1074,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
cost reaches a limit (specified by
|
cost reaches a limit (specified by
|
||||||
<varname>vacuum_cost_limit</varname>), the process performing
|
<varname>vacuum_cost_limit</varname>), the process performing
|
||||||
the operation will sleep for a while (specified by
|
the operation will sleep for a while (specified by
|
||||||
<varname>vacuum_cost_naptime</varname>). Then it will reset the
|
<varname>vacuum_cost_delay</varname>). Then it will reset the
|
||||||
counter and continue execution.
|
counter and continue execution.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -1092,7 +1092,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This feature is disabled by default. To enable it, set the
|
This feature is disabled by default. To enable it, set the
|
||||||
<varname>vacuum_cost_naptime</varname> variable to a nonzero
|
<varname>vacuum_cost_delay</varname> variable to a nonzero
|
||||||
value.
|
value.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@ -1143,8 +1143,8 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry id="guc-vacuum-cost-naptime" xreflabel="vacuum_cost_naptime">
|
<varlistentry id="guc-vacuum-cost-delay" xreflabel="vacuum_cost_delay">
|
||||||
<term><varname>vacuum_cost_naptime</varname> (<type>integer</type>)</term>
|
<term><varname>vacuum_cost_delay</varname> (<type>integer</type>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The length of time, in milliseconds, that the process will nap
|
The length of time, in milliseconds, that the process will nap
|
||||||
@ -1153,7 +1153,7 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
delay feature. Positive values enable cost-based vacuuming.
|
delay feature. Positive values enable cost-based vacuuming.
|
||||||
Note however that on many systems, the effective resolution
|
Note however that on many systems, the effective resolution
|
||||||
of sleep delays is 10 milliseconds; setting
|
of sleep delays is 10 milliseconds; setting
|
||||||
<varname>vacuum_cost_naptime</varname> to a value that is
|
<varname>vacuum_cost_delay</varname> to a value that is
|
||||||
not a multiple of 10 may have the same results as setting it
|
not a multiple of 10 may have the same results as setting it
|
||||||
to the next higher multiple of 10.
|
to the next higher multiple of 10.
|
||||||
</para>
|
</para>
|
||||||
@ -1168,10 +1168,10 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
delays do not occur during such operations. Therefore it is
|
delays do not occur during such operations. Therefore it is
|
||||||
possible that the cost accumulates far higher than the specified
|
possible that the cost accumulates far higher than the specified
|
||||||
limit. To avoid uselessly long delays in such cases, the actual
|
limit. To avoid uselessly long delays in such cases, the actual
|
||||||
naptime is calculated as <varname>vacuum_cost_naptime</varname> *
|
delay is calculated as <varname>vacuum_cost_delay</varname> *
|
||||||
<varname>accumulated_balance</varname> /
|
<varname>accumulated_balance</varname> /
|
||||||
<varname>vacuum_cost_limit</varname> with a maximum of
|
<varname>vacuum_cost_limit</varname> with a maximum of
|
||||||
<varname>vacuum_cost_naptime</varname> * 4.
|
<varname>vacuum_cost_delay</varname> * 4.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.285 2004/07/31 00:45:31 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.286 2004/08/06 04:15:07 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -377,7 +377,7 @@ vacuum(VacuumStmt *vacstmt)
|
|||||||
{
|
{
|
||||||
ListCell *cur;
|
ListCell *cur;
|
||||||
|
|
||||||
VacuumCostActive = (VacuumCostNaptime > 0);
|
VacuumCostActive = (VacuumCostDelay > 0);
|
||||||
VacuumCostBalance = 0;
|
VacuumCostBalance = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3373,9 +3373,9 @@ vacuum_delay_point(void)
|
|||||||
{
|
{
|
||||||
int msec;
|
int msec;
|
||||||
|
|
||||||
msec = VacuumCostNaptime * VacuumCostBalance / VacuumCostLimit;
|
msec = VacuumCostDelay * VacuumCostBalance / VacuumCostLimit;
|
||||||
if (msec > VacuumCostNaptime * 4)
|
if (msec > VacuumCostDelay * 4)
|
||||||
msec = VacuumCostNaptime * 4;
|
msec = VacuumCostDelay * 4;
|
||||||
|
|
||||||
pg_usleep(msec * 1000L);
|
pg_usleep(msec * 1000L);
|
||||||
|
|
||||||
|
@ -9167,7 +9167,7 @@ msgid "Vacuum cost amount available before napping."
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: utils/misc/guc.c:1097
|
#: utils/misc/guc.c:1097
|
||||||
msgid "Vacuum cost naptime in milliseconds."
|
msgid "Vacuum cost delay in milliseconds."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: utils/misc/guc.c:1106
|
#: utils/misc/guc.c:1106
|
||||||
|
@ -9155,7 +9155,7 @@ msgid "Vacuum cost amount available before napping."
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: utils/misc/guc.c:1062
|
#: utils/misc/guc.c:1062
|
||||||
msgid "Vacuum cost naptime in milliseconds."
|
msgid "Vacuum cost delay in milliseconds."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: utils/misc/guc.c:1071
|
#: utils/misc/guc.c:1071
|
||||||
|
@ -9875,7 +9875,7 @@ msgid "Vacuum cost amount available before napping."
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: utils/misc/guc.c:1036
|
#: utils/misc/guc.c:1036
|
||||||
msgid "Vacuum cost naptime in milliseconds."
|
msgid "Vacuum cost delay in milliseconds."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: utils/misc/guc.c:1045
|
#: utils/misc/guc.c:1045
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.91 2004/06/18 06:13:54 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.92 2004/08/06 04:15:09 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Globals used all over the place should be declared here and not
|
* Globals used all over the place should be declared here and not
|
||||||
@ -96,7 +96,7 @@ int VacuumCostPageHit = 1; /* GUC parameters for vacuum */
|
|||||||
int VacuumCostPageMiss = 10;
|
int VacuumCostPageMiss = 10;
|
||||||
int VacuumCostPageDirty = 20;
|
int VacuumCostPageDirty = 20;
|
||||||
int VacuumCostLimit = 200;
|
int VacuumCostLimit = 200;
|
||||||
int VacuumCostNaptime = 0;
|
int VacuumCostDelay = 0;
|
||||||
|
|
||||||
int VacuumCostBalance = 0; /* working state for vacuum */
|
int VacuumCostBalance = 0; /* working state for vacuum */
|
||||||
bool VacuumCostActive = false;
|
bool VacuumCostActive = false;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.226 2004/08/05 23:32:12 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.227 2004/08/06 04:15:09 momjian Exp $
|
||||||
*
|
*
|
||||||
*--------------------------------------------------------------------
|
*--------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1041,11 +1041,11 @@ static struct config_int ConfigureNamesInt[] =
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{"vacuum_cost_naptime", PGC_USERSET, RESOURCES,
|
{"vacuum_cost_delay", PGC_USERSET, RESOURCES,
|
||||||
gettext_noop("Vacuum cost naptime in milliseconds."),
|
gettext_noop("Vacuum cost delay in milliseconds."),
|
||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
&VacuumCostNaptime,
|
&VacuumCostDelay,
|
||||||
0, 0, 1000, NULL, NULL
|
0, 0, 1000, NULL, NULL
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
#vacuum_cost_page_miss = 10 # 0-10000 credits
|
#vacuum_cost_page_miss = 10 # 0-10000 credits
|
||||||
#vacuum_cost_page_dirty = 20 # 0-10000 credits
|
#vacuum_cost_page_dirty = 20 # 0-10000 credits
|
||||||
#vacuum_cost_limit = 200 # 0-10000 credits
|
#vacuum_cost_limit = 200 # 0-10000 credits
|
||||||
#vacuum_cost_naptime = 50 # 0-1000 milliseconds
|
#vacuum_cost_delay = 50 # 0-1000 milliseconds
|
||||||
|
|
||||||
# - Background writer -
|
# - Background writer -
|
||||||
#bgwriter_delay = 200 # 10-5000 milliseconds
|
#bgwriter_delay = 200 # 10-5000 milliseconds
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.164 2004/08/01 17:32:20 tgl Exp $
|
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.165 2004/08/06 04:15:09 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* some of the information in this file should be moved to other files.
|
* some of the information in this file should be moved to other files.
|
||||||
@ -208,7 +208,7 @@ extern int VacuumCostPageHit;
|
|||||||
extern int VacuumCostPageMiss;
|
extern int VacuumCostPageMiss;
|
||||||
extern int VacuumCostPageDirty;
|
extern int VacuumCostPageDirty;
|
||||||
extern int VacuumCostLimit;
|
extern int VacuumCostLimit;
|
||||||
extern int VacuumCostNaptime;
|
extern int VacuumCostDelay;
|
||||||
|
|
||||||
extern int VacuumCostBalance;
|
extern int VacuumCostBalance;
|
||||||
extern bool VacuumCostActive;
|
extern bool VacuumCostActive;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user