1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Make autovacuum behavior more agressive, per discussion on hackers list

--- was part of autovacuum default 'on' patch that was reverted, but we
want this part.

Peter Eisentraut
This commit is contained in:
Bruce Momjian
2006-09-02 23:12:16 +00:00
parent 946abc7c68
commit e0938c3f5b
3 changed files with 14 additions and 14 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.81 2006/09/02 23:04:20 momjian Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.82 2006/09/02 23:12:16 momjian Exp $ -->
<chapter Id="runtime-config"> <chapter Id="runtime-config">
<title>Server Configuration</title> <title>Server Configuration</title>
@ -3113,7 +3113,7 @@ SELECT * FROM parent WHERE key = 2400;
<para> <para>
Specifies the minimum number of updated or deleted tuples needed Specifies the minimum number of updated or deleted tuples needed
to trigger a <command>VACUUM</> in any one table. to trigger a <command>VACUUM</> in any one table.
The default is 1000. The default is 500.
This parameter can only be set in the <filename>postgresql.conf</> This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line. file or on the server command line.
This setting can be overridden for individual tables by entries in This setting can be overridden for individual tables by entries in
@ -3131,7 +3131,7 @@ SELECT * FROM parent WHERE key = 2400;
<para> <para>
Specifies the minimum number of inserted, updated or deleted tuples Specifies the minimum number of inserted, updated or deleted tuples
needed to trigger an <command>ANALYZE</> in any one table. needed to trigger an <command>ANALYZE</> in any one table.
The default is 500. The default is 250.
This parameter can only be set in the <filename>postgresql.conf</> This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line. file or on the server command line.
This setting can be overridden for individual tables by entries in This setting can be overridden for individual tables by entries in
@ -3150,7 +3150,7 @@ SELECT * FROM parent WHERE key = 2400;
Specifies a fraction of the table size to add to Specifies a fraction of the table size to add to
<varname>autovacuum_vacuum_threshold</varname> <varname>autovacuum_vacuum_threshold</varname>
when deciding whether to trigger a <command>VACUUM</>. when deciding whether to trigger a <command>VACUUM</>.
The default is 0.4. The default is 0.2.
This parameter can only be set in the <filename>postgresql.conf</> This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line. file or on the server command line.
This setting can be overridden for individual tables by entries in This setting can be overridden for individual tables by entries in
@ -3169,7 +3169,7 @@ SELECT * FROM parent WHERE key = 2400;
Specifies a fraction of the table size to add to Specifies a fraction of the table size to add to
<varname>autovacuum_analyze_threshold</varname> <varname>autovacuum_analyze_threshold</varname>
when deciding whether to trigger an <command>ANALYZE</>. when deciding whether to trigger an <command>ANALYZE</>.
The default is 0.2. The default is 0.1.
This parameter can only be set in the <filename>postgresql.conf</> This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line. file or on the server command line.
This setting can be overridden for individual tables by entries in This setting can be overridden for individual tables by entries in

View File

@ -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.349 2006/09/02 23:04:20 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.350 2006/09/02 23:12:16 momjian Exp $
* *
*-------------------------------------------------------------------- *--------------------------------------------------------------------
*/ */
@ -1564,7 +1564,7 @@ static struct config_int ConfigureNamesInt[] =
NULL NULL
}, },
&autovacuum_vac_thresh, &autovacuum_vac_thresh,
1000, 0, INT_MAX, NULL, NULL 500, 0, INT_MAX, NULL, NULL
}, },
{ {
{"autovacuum_analyze_threshold", PGC_SIGHUP, AUTOVACUUM, {"autovacuum_analyze_threshold", PGC_SIGHUP, AUTOVACUUM,
@ -1572,7 +1572,7 @@ static struct config_int ConfigureNamesInt[] =
NULL NULL
}, },
&autovacuum_anl_thresh, &autovacuum_anl_thresh,
500, 0, INT_MAX, NULL, NULL 250, 0, INT_MAX, NULL, NULL
}, },
{ {
@ -1738,7 +1738,7 @@ static struct config_real ConfigureNamesReal[] =
NULL NULL
}, },
&autovacuum_vac_scale, &autovacuum_vac_scale,
0.4, 0.0, 100.0, NULL, NULL 0.2, 0.0, 100.0, NULL, NULL
}, },
{ {
{"autovacuum_analyze_scale_factor", PGC_SIGHUP, AUTOVACUUM, {"autovacuum_analyze_scale_factor", PGC_SIGHUP, AUTOVACUUM,
@ -1746,7 +1746,7 @@ static struct config_real ConfigureNamesReal[] =
NULL NULL
}, },
&autovacuum_anl_scale, &autovacuum_anl_scale,
0.2, 0.0, 100.0, NULL, NULL 0.1, 0.0, 100.0, NULL, NULL
}, },
/* End-of-list marker */ /* End-of-list marker */

View File

@ -363,13 +363,13 @@
#autovacuum = off # enable autovacuum subprocess? #autovacuum = off # enable autovacuum subprocess?
#autovacuum_naptime = 60 # time between autovacuum runs, in secs #autovacuum_naptime = 60 # time between autovacuum runs, in secs
#autovacuum_vacuum_threshold = 1000 # min # of tuple updates before #autovacuum_vacuum_threshold = 500 # min # of tuple updates before
# vacuum # vacuum
#autovacuum_analyze_threshold = 500 # min # of tuple updates before #autovacuum_analyze_threshold = 250 # min # of tuple updates before
# analyze # analyze
#autovacuum_vacuum_scale_factor = 0.4 # fraction of rel size before #autovacuum_vacuum_scale_factor = 0.2 # fraction of rel size before
# vacuum # vacuum
#autovacuum_analyze_scale_factor = 0.2 # fraction of rel size before #autovacuum_analyze_scale_factor = 0.1 # fraction of rel size before
# analyze # analyze
#autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for #autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for
# autovac, -1 means use # autovac, -1 means use