Tom Lane wrote:
> Alvaro Herrera <[EMAIL PROTECTED]> writes:
> > OK, 20ms it is then. Here is a patch. I am taking the liberty to also
> > lower the vacuum and analyze threshold default values to 50, per
> > previous discussion.
>
> Patch probably needs to touch docs (config.sgml at least) too?
That's right -- I was happy because I checked maintenance.sgml and
catalog.sgml and they didn't need any update, I forgot to check
config.sgml.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Index: doc/src/sgml/config.sgml
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/config.sgml,v
retrieving revision 1.131
diff -c -p -r1.131 config.sgml
*** doc/src/sgml/config.sgml 18 Jul 2007 12:00:47 -0000 1.131
--- doc/src/sgml/config.sgml 24 Jul 2007 00:22:46 -0000
*************** SELECT * FROM parent WHERE key = 2400;
*** 3247,3253 ****
<para>
Specifies the minimum number of updated or deleted tuples needed
to trigger a <command>VACUUM</> in any one table.
! The default is 500 tuples.
This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line.
This setting can be overridden for individual tables by entries in
--- 3247,3253 ----
<para>
Specifies the minimum number of updated or deleted tuples needed
to trigger a <command>VACUUM</> in any one table.
! The default is 50 tuples.
This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line.
This setting can be overridden for individual tables by entries in
*************** SELECT * FROM parent WHERE key = 2400;
*** 3265,3271 ****
<para>
Specifies the minimum number of inserted, updated or deleted tuples
needed to trigger an <command>ANALYZE</> in any one table.
! The default is 250 tuples.
This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line.
This setting can be overridden for individual tables by entries in
--- 3265,3271 ----
<para>
Specifies the minimum number of inserted, updated or deleted tuples
needed to trigger an <command>ANALYZE</> in any one table.
! The default is 50 tuples.
This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line.
This setting can be overridden for individual tables by entries in
*************** SELECT * FROM parent WHERE key = 2400;
*** 3343,3350 ****
<para>
Specifies the cost delay value that will be used in automatic
<command>VACUUM</> operations. If <literal>-1</> is
! specified (which is the default), the regular
<xref linkend="guc-vacuum-cost-delay"> value will be used.
This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line.
This setting can be overridden for individual tables by entries in
--- 3343,3351 ----
<para>
Specifies the cost delay value that will be used in automatic
<command>VACUUM</> operations. If <literal>-1</> is
! specified, the regular
<xref linkend="guc-vacuum-cost-delay"> value will be used.
+ The default value is 20 milliseconds.
This parameter can only be set in the <filename>postgresql.conf</>
file or on the server command line.
This setting can be overridden for individual tables by entries in
Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v
retrieving revision 1.405
diff -c -p -r1.405 guc.c
*** src/backend/utils/misc/guc.c 10 Jul 2007 13:14:21 -0000 1.405
--- src/backend/utils/misc/guc.c 24 Jul 2007 00:22:51 -0000
*************** static struct config_int ConfigureNamesI
*** 1348,1354 ****
GUC_UNIT_MS
},
&autovacuum_vac_cost_delay,
! -1, -1, 1000, NULL, NULL
},
{
--- 1348,1354 ----
GUC_UNIT_MS
},
&autovacuum_vac_cost_delay,
! 20, -1, 1000, NULL, NULL
},
{
*************** static struct config_int ConfigureNamesI
*** 1656,1662 ****
NULL
},
&autovacuum_vac_thresh,
! 500, 0, INT_MAX, NULL, NULL
},
{
{"autovacuum_analyze_threshold", PGC_SIGHUP, AUTOVACUUM,
--- 1656,1662 ----
NULL
},
&autovacuum_vac_thresh,
! 50, 0, INT_MAX, NULL, NULL
},
{
{"autovacuum_analyze_threshold", PGC_SIGHUP, AUTOVACUUM,
*************** static struct config_int ConfigureNamesI
*** 1664,1670 ****
NULL
},
&autovacuum_anl_thresh,
! 250, 0, INT_MAX, NULL, NULL
},
{
/* see varsup.c for why this is PGC_POSTMASTER not PGC_SIGHUP */
--- 1664,1670 ----
NULL
},
&autovacuum_anl_thresh,
! 50, 0, INT_MAX, NULL, NULL
},
{
/* see varsup.c for why this is PGC_POSTMASTER not PGC_SIGHUP */
Index: src/backend/utils/misc/postgresql.conf.sample
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/misc/postgresql.conf.sample,v
retrieving revision 1.219
diff -c -p -r1.219 postgresql.conf.sample
*** src/backend/utils/misc/postgresql.conf.sample 10 Jul 2007 13:14:21 -0000 1.219
--- src/backend/utils/misc/postgresql.conf.sample 24 Jul 2007 00:22:52 -0000
***************
*** 381,389 ****
#log_autovacuum = -1 # -1 is disabled, 0 logs all actions
# and their durations, > 0 logs only
# actions running at least N msec.
! #autovacuum_vacuum_threshold = 500 # min # of tuple updates before
# vacuum
! #autovacuum_analyze_threshold = 250 # min # of tuple updates before
# analyze
#autovacuum_vacuum_scale_factor = 0.2 # fraction of rel size before
# vacuum
--- 381,389 ----
#log_autovacuum = -1 # -1 is disabled, 0 logs all actions
# and their durations, > 0 logs only
# actions running at least N msec.
! #autovacuum_vacuum_threshold = 50 # min # of tuple updates before
# vacuum
! #autovacuum_analyze_threshold = 50 # min # of tuple updates before
# analyze
#autovacuum_vacuum_scale_factor = 0.2 # fraction of rel size before
# vacuum
***************
*** 391,397 ****
# analyze
#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
# (change requires restart)
! #autovacuum_vacuum_cost_delay = -1 # default vacuum cost delay for
# autovacuum, -1 means use
# vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
--- 391,397 ----
# analyze
#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
# (change requires restart)
! #autovacuum_vacuum_cost_delay = 20 # default vacuum cost delay for
# autovacuum, -1 means use
# vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate