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. + + + The default is 1 on supported systems, otherwise 0. + 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);