Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7feaccc

Browse files
committed
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.
1 parent b87671f commit 7feaccc

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

doc/src/sgml/config.sgml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,6 +1892,10 @@ include_dir 'conf.d'
18921892
in an error. On some operating systems (e.g., Solaris), the function
18931893
is present but does not actually do anything.
18941894
</para>
1895+
1896+
<para>
1897+
The default is 1 on supported systems, otherwise 0.
1898+
</para>
18951899
</listitem>
18961900
</varlistentry>
18971901

src/backend/utils/misc/guc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,11 +2258,7 @@ static struct config_int ConfigureNamesInt[] =
22582258

22592259
{
22602260
{"effective_io_concurrency",
2261-
#ifdef USE_PREFETCH
22622261
PGC_USERSET,
2263-
#else
2264-
PGC_INTERNAL,
2265-
#endif
22662262
RESOURCES_ASYNCHRONOUS,
22672263
gettext_noop("Number of simultaneous requests that can be handled efficiently by the disk subsystem."),
22682264
gettext_noop("For RAID arrays, this should be approximately the number of drive spindles in the array.")

src/bin/initdb/initdb.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,12 @@ setup_config(void)
12881288
conflines = replace_token(conflines, "#dynamic_shared_memory_type = posix",
12891289
repltok);
12901290

1291+
#if !USE_PREFETCH
1292+
conflines = replace_token(conflines,
1293+
"#effective_io_concurrency = 1",
1294+
"#effective_io_concurrency = 0");
1295+
#endif
1296+
12911297
snprintf(path, sizeof(path), "%s/postgresql.conf", pg_data);
12921298

12931299
writefile(path, conflines);

0 commit comments

Comments
 (0)