From 7feaccc21791d9d745bac013e5e0396bdde2d81c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 18 Oct 2014 21:35:46 -0400 Subject: 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. --- src/backend/utils/misc/guc.c | 4 ---- src/bin/initdb/initdb.c | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') 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); -- cgit v1.2.3