mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
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.
This commit is contained in:
parent
b87671f1b6
commit
7feaccc217
@ -1892,6 +1892,10 @@ include_dir 'conf.d'
|
|||||||
in an error. On some operating systems (e.g., Solaris), the function
|
in an error. On some operating systems (e.g., Solaris), the function
|
||||||
is present but does not actually do anything.
|
is present but does not actually do anything.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The default is 1 on supported systems, otherwise 0.
|
||||||
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -2258,11 +2258,7 @@ static struct config_int ConfigureNamesInt[] =
|
|||||||
|
|
||||||
{
|
{
|
||||||
{"effective_io_concurrency",
|
{"effective_io_concurrency",
|
||||||
#ifdef USE_PREFETCH
|
|
||||||
PGC_USERSET,
|
PGC_USERSET,
|
||||||
#else
|
|
||||||
PGC_INTERNAL,
|
|
||||||
#endif
|
|
||||||
RESOURCES_ASYNCHRONOUS,
|
RESOURCES_ASYNCHRONOUS,
|
||||||
gettext_noop("Number of simultaneous requests that can be handled efficiently by the disk subsystem."),
|
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.")
|
gettext_noop("For RAID arrays, this should be approximately the number of drive spindles in the array.")
|
||||||
|
@ -1288,6 +1288,12 @@ setup_config(void)
|
|||||||
conflines = replace_token(conflines, "#dynamic_shared_memory_type = posix",
|
conflines = replace_token(conflines, "#dynamic_shared_memory_type = posix",
|
||||||
repltok);
|
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);
|
snprintf(path, sizeof(path), "%s/postgresql.conf", pg_data);
|
||||||
|
|
||||||
writefile(path, conflines);
|
writefile(path, conflines);
|
||||||
|
Loading…
Reference in New Issue
Block a user