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

Commite0938c3

Browse files
committed
Make autovacuum behavior more agressive, per discussion on hackers list
--- was part of autovacuum default 'on' patch that was reverted, but wewant this part.Peter Eisentraut
1 parent946abc7 commite0938c3

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.81 2006/09/02 23:04:20 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.82 2006/09/02 23:12:16 momjian Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -3113,7 +3113,7 @@ SELECT * FROM parent WHERE key = 2400;
31133113
<para>
31143114
Specifies the minimum number of updated or deleted tuples needed
31153115
to trigger a <command>VACUUM</> in any one table.
3116-
The default is1000.
3116+
The default is500.
31173117
This parameter can only be set in the <filename>postgresql.conf</>
31183118
file or on the server command line.
31193119
This setting can be overridden for individual tables by entries in
@@ -3131,7 +3131,7 @@ SELECT * FROM parent WHERE key = 2400;
31313131
<para>
31323132
Specifies the minimum number of inserted, updated or deleted tuples
31333133
needed to trigger an <command>ANALYZE</> in any one table.
3134-
The default is500.
3134+
The default is250.
31353135
This parameter can only be set in the <filename>postgresql.conf</>
31363136
file or on the server command line.
31373137
This setting can be overridden for individual tables by entries in
@@ -3150,7 +3150,7 @@ SELECT * FROM parent WHERE key = 2400;
31503150
Specifies a fraction of the table size to add to
31513151
<varname>autovacuum_vacuum_threshold</varname>
31523152
when deciding whether to trigger a <command>VACUUM</>.
3153-
The default is 0.4.
3153+
The default is 0.2.
31543154
This parameter can only be set in the <filename>postgresql.conf</>
31553155
file or on the server command line.
31563156
This setting can be overridden for individual tables by entries in
@@ -3169,7 +3169,7 @@ SELECT * FROM parent WHERE key = 2400;
31693169
Specifies a fraction of the table size to add to
31703170
<varname>autovacuum_analyze_threshold</varname>
31713171
when deciding whether to trigger an <command>ANALYZE</>.
3172-
The default is 0.2.
3172+
The default is 0.1.
31733173
This parameter can only be set in the <filename>postgresql.conf</>
31743174
file or on the server command line.
31753175
This setting can be overridden for individual tables by entries in

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

Lines changed: 5 additions & 5 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.349 2006/09/02 23:04:20 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.350 2006/09/02 23:12:16 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -1564,15 +1564,15 @@ static struct config_int ConfigureNamesInt[] =
15641564
NULL
15651565
},
15661566
&autovacuum_vac_thresh,
1567-
1000,0,INT_MAX,NULL,NULL
1567+
500,0,INT_MAX,NULL,NULL
15681568
},
15691569
{
15701570
{"autovacuum_analyze_threshold",PGC_SIGHUP,AUTOVACUUM,
15711571
gettext_noop("Minimum number of tuple inserts, updates or deletes prior to analyze."),
15721572
NULL
15731573
},
15741574
&autovacuum_anl_thresh,
1575-
500,0,INT_MAX,NULL,NULL
1575+
250,0,INT_MAX,NULL,NULL
15761576
},
15771577

15781578
{
@@ -1738,15 +1738,15 @@ static struct config_real ConfigureNamesReal[] =
17381738
NULL
17391739
},
17401740
&autovacuum_vac_scale,
1741-
0.4,0.0,100.0,NULL,NULL
1741+
0.2,0.0,100.0,NULL,NULL
17421742
},
17431743
{
17441744
{"autovacuum_analyze_scale_factor",PGC_SIGHUP,AUTOVACUUM,
17451745
gettext_noop("Number of tuple inserts, updates or deletes prior to analyze as a fraction of reltuples."),
17461746
NULL
17471747
},
17481748
&autovacuum_anl_scale,
1749-
0.2,0.0,100.0,NULL,NULL
1749+
0.1,0.0,100.0,NULL,NULL
17501750
},
17511751

17521752
/* End-of-list marker */

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,13 @@
363363

364364
#autovacuum = off# enable autovacuum subprocess?
365365
#autovacuum_naptime = 60# time between autovacuum runs, in secs
366-
#autovacuum_vacuum_threshold =1000# min # of tuple updates before
366+
#autovacuum_vacuum_threshold =500# min # of tuple updates before
367367
# vacuum
368-
#autovacuum_analyze_threshold =500# min # of tuple updates before
368+
#autovacuum_analyze_threshold =250# min # of tuple updates before
369369
# analyze
370-
#autovacuum_vacuum_scale_factor = 0.4# fraction of rel size before
370+
#autovacuum_vacuum_scale_factor = 0.2# fraction of rel size before
371371
# vacuum
372-
#autovacuum_analyze_scale_factor = 0.2# fraction of rel size before
372+
#autovacuum_analyze_scale_factor = 0.1# fraction of rel size before
373373
# analyze
374374
#autovacuum_vacuum_cost_delay = -1# default vacuum cost delay for
375375
# autovac, -1 means use

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp