diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2014-10-18 21:35:46 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2014-10-18 21:35:46 -0400 |
commit | 7feaccc21791d9d745bac013e5e0396bdde2d81c (patch) | |
tree | 4d1469607bc764cb4561406cb5a5a05667932b89 | |
parent | b87671f1b63a0c9cf264afc209e3acebdb52477f (diff) | |
download | postgresql-7feaccc21791d9d745bac013e5e0396bdde2d81c.tar.gz postgresql-7feaccc21791d9d745bac013e5e0396bdde2d81c.zip |
Allow setting effective_io_concurrency even on unsupported systems
This matches the behavior of other parameters that are unsupported on
some systems (e.g., ssl).
Also document the default value.
-rw-r--r-- | doc/src/sgml/config.sgml | 4 | ||||
-rw-r--r-- | src/backend/utils/misc/guc.c | 4 | ||||
-rw-r--r-- | src/bin/initdb/initdb.c | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 6ee17d84772..47b11922455 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1892,6 +1892,10 @@ include_dir 'conf.d' in an error. On some operating systems (e.g., Solaris), the function is present but does not actually do anything. </para> + + <para> + The default is 1 on supported systems, otherwise 0. + </para> </listitem> </varlistentry> diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index dca533ac916..d7142d218dc 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2258,11 +2258,7 @@ static struct config_int ConfigureNamesInt[] = { {"effective_io_concurrency", -#ifdef USE_PREFETCH PGC_USERSET, -#else - PGC_INTERNAL, -#endif RESOURCES_ASYNCHRONOUS, gettext_noop("Number of simultaneous requests that can be handled efficiently by the disk subsystem."), gettext_noop("For RAID arrays, this should be approximately the number of drive spindles in the array.") diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index c8ff2cbc7bc..e6c9e480d33 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -1288,6 +1288,12 @@ setup_config(void) conflines = replace_token(conflines, "#dynamic_shared_memory_type = posix", repltok); +#if !USE_PREFETCH + conflines = replace_token(conflines, + "#effective_io_concurrency = 1", + "#effective_io_concurrency = 0"); +#endif + snprintf(path, sizeof(path), "%s/postgresql.conf", pg_data); writefile(path, conflines); |