From 52985e4fea75f1ec742742f27e246a8775c99e08 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 10 Mar 2019 15:05:25 -0400 Subject: [PATCH] Revert "Increase the default vacuum_cost_limit from 200 to 2000" This reverts commit bd09503e633b8077822bb4daf91625b71ac16253. Per discussion, it seems like what we should do instead is to reduce the default value of autovacuum_vacuum_cost_delay by the same factor. That's functionally equivalent as long as the platform can accurately service the smaller delay request, which should be true on anything released in the last 10 years or more. And smaller, more-closely-spaced delays are better in terms of providing a steady I/O load. Discussion: https://postgr.es/m/28720.1552101086@sss.pgh.pa.us --- doc/src/sgml/config.sgml | 2 +- src/backend/utils/init/globals.c | 2 +- src/backend/utils/misc/guc.c | 2 +- src/backend/utils/misc/postgresql.conf.sample | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index c12170b4b6..00664cd83e 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1932,7 +1932,7 @@ include_dir 'conf.d' The accumulated cost that will cause the vacuuming process to sleep. - The default value is 2000. + The default value is 200. diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c index 6d1e94f817..a5950c1e8c 100644 --- a/src/backend/utils/init/globals.c +++ b/src/backend/utils/init/globals.c @@ -137,7 +137,7 @@ int MaxBackends = 0; int VacuumCostPageHit = 1; /* GUC parameters for vacuum */ int VacuumCostPageMiss = 10; int VacuumCostPageDirty = 20; -int VacuumCostLimit = 2000; +int VacuumCostLimit = 200; double VacuumCostDelay = 0; int VacuumPageHit = 0; diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 6e396f1598..c82804b1b9 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2265,7 +2265,7 @@ static struct config_int ConfigureNamesInt[] = NULL }, &VacuumCostLimit, - 2000, 1, 10000, + 200, 1, 10000, NULL, NULL, NULL }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 417f00a841..6f97a9ae28 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -159,7 +159,7 @@ #vacuum_cost_page_hit = 1 # 0-10000 credits #vacuum_cost_page_miss = 10 # 0-10000 credits #vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 2000 # 1-10000 credits +#vacuum_cost_limit = 200 # 1-10000 credits # - Background Writer - -- 2.40.0