Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
0307c09c
Commit
0307c09c
authored
Aug 06, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename vacuum_cost_naptime to vacuum_cost_delay, with agreement from Jan.
parent
bdf8ef69
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
25 deletions
+25
-25
doc/src/sgml/runtime.sgml
doc/src/sgml/runtime.sgml
+8
-8
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+5
-5
src/backend/po/af.po
src/backend/po/af.po
+1
-1
src/backend/po/sv.po
src/backend/po/sv.po
+1
-1
src/backend/po/zh_TW.po
src/backend/po/zh_TW.po
+1
-1
src/backend/utils/init/globals.c
src/backend/utils/init/globals.c
+2
-2
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+4
-4
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/misc/postgresql.conf.sample
+1
-1
src/include/miscadmin.h
src/include/miscadmin.h
+2
-2
No files found.
doc/src/sgml/runtime.sgml
View file @
0307c09c
<!--
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.27
2 2004/08/05 23:32:10 tgl
Exp $
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.27
3 2004/08/06 04:15:07 momjian
Exp $
-->
<Chapter Id="runtime">
...
...
@@ -1074,7 +1074,7 @@ SET ENABLE_SEQSCAN TO OFF;
cost reaches a limit (specified by
<varname>vacuum_cost_limit</varname>), the process performing
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.
</para>
...
...
@@ -1092,7 +1092,7 @@ SET ENABLE_SEQSCAN TO OFF;
<para>
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.
</para>
...
...
@@ -1143,8 +1143,8 @@ SET ENABLE_SEQSCAN TO OFF;
</listitem>
</varlistentry>
<varlistentry id="guc-vacuum-cost-
naptime" xreflabel="vacuum_cost_naptime
">
<term><varname>vacuum_cost_
naptime
</varname> (<type>integer</type>)</term>
<varlistentry id="guc-vacuum-cost-
delay" xreflabel="vacuum_cost_delay
">
<term><varname>vacuum_cost_
delay
</varname> (<type>integer</type>)</term>
<listitem>
<para>
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.
Note however that on many systems, the effective resolution
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
to the next higher multiple of 10.
</para>
...
...
@@ -1168,10 +1168,10 @@ SET ENABLE_SEQSCAN TO OFF;
delays do not occur during such operations. Therefore it is
possible that the cost accumulates far higher than the specified
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>vacuum_cost_limit</varname> with a maximum of
<varname>vacuum_cost_
naptime
</varname> * 4.
<varname>vacuum_cost_
delay
</varname> * 4.
</para>
</note>
...
...
src/backend/commands/vacuum.c
View file @
0307c09c
...
...
@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.28
5 2004/07/31 00:45:31 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.28
6 2004/08/06 04:15:07 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -377,7 +377,7 @@ vacuum(VacuumStmt *vacstmt)
{
ListCell
*
cur
;
VacuumCostActive
=
(
VacuumCost
Naptime
>
0
);
VacuumCostActive
=
(
VacuumCost
Delay
>
0
);
VacuumCostBalance
=
0
;
/*
...
...
@@ -3373,9 +3373,9 @@ vacuum_delay_point(void)
{
int
msec
;
msec
=
VacuumCost
Naptime
*
VacuumCostBalance
/
VacuumCostLimit
;
if
(
msec
>
VacuumCost
Naptime
*
4
)
msec
=
VacuumCost
Naptime
*
4
;
msec
=
VacuumCost
Delay
*
VacuumCostBalance
/
VacuumCostLimit
;
if
(
msec
>
VacuumCost
Delay
*
4
)
msec
=
VacuumCost
Delay
*
4
;
pg_usleep
(
msec
*
1000L
);
...
...
src/backend/po/af.po
View file @
0307c09c
...
...
@@ -9167,7 +9167,7 @@ msgid "Vacuum cost amount available before napping."
msgstr ""
#: utils/misc/guc.c:1097
msgid "Vacuum cost
naptime
in milliseconds."
msgid "Vacuum cost
delay
in milliseconds."
msgstr ""
#: utils/misc/guc.c:1106
...
...
src/backend/po/sv.po
View file @
0307c09c
...
...
@@ -9155,7 +9155,7 @@ msgid "Vacuum cost amount available before napping."
msgstr ""
#: utils/misc/guc.c:1062
msgid "Vacuum cost
naptime
in milliseconds."
msgid "Vacuum cost
delay
in milliseconds."
msgstr ""
#: utils/misc/guc.c:1071
...
...
src/backend/po/zh_TW.po
View file @
0307c09c
...
...
@@ -9875,7 +9875,7 @@ msgid "Vacuum cost amount available before napping."
msgstr ""
#: utils/misc/guc.c:1036
msgid "Vacuum cost
naptime
in milliseconds."
msgid "Vacuum cost
delay
in milliseconds."
msgstr ""
#: utils/misc/guc.c:1045
...
...
src/backend/utils/init/globals.c
View file @
0307c09c
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.9
1 2004/06/18 06:13:54 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.9
2 2004/08/06 04:15:09 momjian
Exp $
*
* NOTES
* 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
VacuumCostPageDirty
=
20
;
int
VacuumCostLimit
=
200
;
int
VacuumCost
Naptime
=
0
;
int
VacuumCost
Delay
=
0
;
int
VacuumCostBalance
=
0
;
/* working state for vacuum */
bool
VacuumCostActive
=
false
;
src/backend/utils/misc/guc.c
View file @
0307c09c
...
...
@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.22
6 2004/08/05 23:32:12 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.22
7 2004/08/06 04:15:09 momjian
Exp $
*
*--------------------------------------------------------------------
*/
...
...
@@ -1041,11 +1041,11 @@ static struct config_int ConfigureNamesInt[] =
},
{
{
"vacuum_cost_
naptime
"
,
PGC_USERSET
,
RESOURCES
,
gettext_noop
(
"Vacuum cost
naptime
in milliseconds."
),
{
"vacuum_cost_
delay
"
,
PGC_USERSET
,
RESOURCES
,
gettext_noop
(
"Vacuum cost
delay
in milliseconds."
),
NULL
},
&
VacuumCost
Naptime
,
&
VacuumCost
Delay
,
0
,
0
,
1000
,
NULL
,
NULL
},
...
...
src/backend/utils/misc/postgresql.conf.sample
View file @
0307c09c
...
...
@@ -74,7 +74,7 @@
#vacuum_cost_page_miss = 10 # 0-10000 credits
#vacuum_cost_page_dirty = 20 # 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 -
#bgwriter_delay = 200 # 10-5000 milliseconds
...
...
src/include/miscadmin.h
View file @
0307c09c
...
...
@@ -13,7 +13,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.16
4 2004/08/01 17:32:20 tgl
Exp $
* $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.16
5 2004/08/06 04:15:09 momjian
Exp $
*
* NOTES
* 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
VacuumCostPageDirty
;
extern
int
VacuumCostLimit
;
extern
int
VacuumCost
Naptime
;
extern
int
VacuumCost
Delay
;
extern
int
VacuumCostBalance
;
extern
bool
VacuumCostActive
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment