From cbccac371c79d96c44fcd8c9cbb5ff4dedaaa522 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 10 Mar 2019 15:16:21 -0400 Subject: [PATCH] Reduce the default value of autovacuum_vacuum_cost_delay to 2ms. This is a better way to implement the desired change of increasing autovacuum's default resource consumption. Discussion: https://postgr.es/m/28720.1552101086@sss.pgh.pa.us --- doc/src/sgml/config.sgml | 2 +- src/backend/utils/misc/guc.c | 2 +- src/backend/utils/misc/postgresql.conf.sample | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 00664cd83e..fe1735722a 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -7033,7 +7033,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; Specifies the cost delay value that will be used in automatic VACUUM operations. If -1 is specified, the regular value will be used. - The default value is 20 milliseconds. + The default value is 2 milliseconds. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index c82804b1b9..fe6c6f8a05 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -3312,7 +3312,7 @@ static struct config_real ConfigureNamesReal[] = GUC_UNIT_MS }, &autovacuum_vac_cost_delay, - 20, -1, 100, + 2, -1, 100, NULL, NULL, NULL }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 6f97a9ae28..cccb5f145a 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -589,7 +589,7 @@ #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age # before forced vacuum # (change requires restart) -#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for +#autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for # autovacuum, in milliseconds; # -1 means use vacuum_cost_delay #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for -- 2.40.0