aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-05-08 20:49:38 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-05-08 20:49:38 -0400
commita16d421ca4fc639929bc964b2585e8382cf16e33 (patch)
treec67fe19b554dc2da53cbacc0349ce58ac2bf8514 /src/backend/utils
parent08c8e8962f56c23c6799178d52d3b31350a0708f (diff)
downloadpostgresql-a16d421ca4fc639929bc964b2585e8382cf16e33.tar.gz
postgresql-a16d421ca4fc639929bc964b2585e8382cf16e33.zip
Revert "Auto-tune effective_cache size to be 4x shared buffers"
This reverts commit ee1e5662d8d8330726eaef7d3110cb7add24d058, as well as a remarkably large number of followup commits, which were mostly concerned with the fact that the implementation didn't work terribly well. It still doesn't: we probably need some rather basic work in the GUC infrastructure if we want to fully support GUCs whose default varies depending on the value of another GUC. Meanwhile, it also emerged that there wasn't really consensus in favor of the definition the patch tried to implement (ie, effective_cache_size should default to 4 times shared_buffers). So whack it all back to where it was. In a followup commit, I'll do what was recently agreed to, which is to simply change the default to a higher value.
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/misc/guc-file.l1
-rw-r--r--src/backend/utils/misc/guc.c7
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample2
3 files changed, 3 insertions, 7 deletions
diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l
index ee380405215..5d830c79d01 100644
--- a/src/backend/utils/misc/guc-file.l
+++ b/src/backend/utils/misc/guc-file.l
@@ -298,7 +298,6 @@ ProcessConfigFile(GucContext context)
{
InitializeGUCOptionsFromEnvironment();
pg_timezone_abbrev_initialize();
- set_default_effective_cache_size();
/* this selects SQL_ASCII in processes not connected to a database */
SetConfigOption("client_encoding", GetDatabaseEncodingName(),
PGC_BACKEND, PGC_S_DYNAMIC_DEFAULT);
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 0401cd4d2a6..ddd333fea40 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2512,8 +2512,8 @@ static struct config_int ConfigureNamesInt[] =
GUC_UNIT_BLOCKS,
},
&effective_cache_size,
- -1, -1, INT_MAX,
- check_effective_cache_size, NULL, NULL
+ DEFAULT_EFFECTIVE_CACHE_SIZE, 1, INT_MAX,
+ NULL, NULL, NULL
},
{
@@ -4372,9 +4372,6 @@ SelectConfigFiles(const char *userDoption, const char *progname)
*/
pg_timezone_abbrev_initialize();
- /* Also install the correct value for effective_cache_size */
- set_default_effective_cache_size();
-
/*
* Figure out where pg_hba.conf is, and make sure the path is absolute.
*/
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 70e5a5111ec..61685f7c13f 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -283,7 +283,7 @@
#cpu_tuple_cost = 0.01 # same scale as above
#cpu_index_tuple_cost = 0.005 # same scale as above
#cpu_operator_cost = 0.0025 # same scale as above
-#effective_cache_size = -1 # -1 selects auto-tuned default
+#effective_cache_size = 128MB
# - Genetic Query Optimizer -