aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/common/reloptions.c8
-rw-r--r--src/backend/commands/variable.c30
-rw-r--r--src/backend/utils/misc/guc_tables.c4
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample4
-rw-r--r--src/bin/initdb/initdb.c5
-rw-r--r--src/include/storage/bufmgr.h6
-rw-r--r--src/include/utils/guc_hooks.h4
7 files changed, 4 insertions, 57 deletions
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index 645b5c00467..46c1dce222d 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -361,11 +361,7 @@ static relopt_int intRelOpts[] =
RELOPT_KIND_TABLESPACE,
ShareUpdateExclusiveLock
},
-#ifdef USE_PREFETCH
-1, 0, MAX_IO_CONCURRENCY
-#else
- 0, 0, 0
-#endif
},
{
{
@@ -374,11 +370,7 @@ static relopt_int intRelOpts[] =
RELOPT_KIND_TABLESPACE,
ShareUpdateExclusiveLock
},
-#ifdef USE_PREFETCH
-1, 0, MAX_IO_CONCURRENCY
-#else
- 0, 0, 0
-#endif
},
{
{
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index 84f044a1959..a9f2a3a3062 100644
--- a/src/backend/commands/variable.c
+++ b/src/backend/commands/variable.c
@@ -1145,7 +1145,6 @@ check_cluster_name(char **newval, void **extra, GucSource source)
void
assign_maintenance_io_concurrency(int newval, void *extra)
{
-#ifdef USE_PREFETCH
/*
* Reconfigure recovery prefetching, because a setting it depends on
* changed.
@@ -1153,7 +1152,6 @@ assign_maintenance_io_concurrency(int newval, void *extra)
maintenance_io_concurrency = newval;
if (AmStartupProcess())
XLogPrefetchReconfigure();
-#endif
}
/*
@@ -1250,34 +1248,6 @@ check_default_with_oids(bool *newval, void **extra, GucSource source)
}
bool
-check_effective_io_concurrency(int *newval, void **extra, GucSource source)
-{
-#ifndef USE_PREFETCH
- if (*newval != 0)
- {
- GUC_check_errdetail("\"%s\" must be set to 0 on platforms that lack support for issuing read-ahead advice.",
- "effective_io_concurrency");
- return false;
- }
-#endif /* USE_PREFETCH */
- return true;
-}
-
-bool
-check_maintenance_io_concurrency(int *newval, void **extra, GucSource source)
-{
-#ifndef USE_PREFETCH
- if (*newval != 0)
- {
- GUC_check_errdetail("\"%s\" must be set to 0 on platforms that lack support for issuing read-ahead advice.",
- "maintenance_io_concurrency");
- return false;
- }
-#endif /* USE_PREFETCH */
- return true;
-}
-
-bool
check_ssl(bool *newval, void **extra, GucSource source)
{
#ifndef USE_SSL
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index 76c7c6bb4b1..4eaeca89f2c 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -3235,7 +3235,7 @@ struct config_int ConfigureNamesInt[] =
&effective_io_concurrency,
DEFAULT_EFFECTIVE_IO_CONCURRENCY,
0, MAX_IO_CONCURRENCY,
- check_effective_io_concurrency, NULL, NULL
+ NULL, NULL, NULL
},
{
@@ -3249,7 +3249,7 @@ struct config_int ConfigureNamesInt[] =
&maintenance_io_concurrency,
DEFAULT_MAINTENANCE_IO_CONCURRENCY,
0, MAX_IO_CONCURRENCY,
- check_maintenance_io_concurrency, assign_maintenance_io_concurrency,
+ NULL, assign_maintenance_io_concurrency,
NULL
},
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 7c12434efa2..ff56a1f0732 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -198,8 +198,8 @@
# - I/O -
#backend_flush_after = 0 # measured in pages, 0 disables
-#effective_io_concurrency = 16 # 1-1000; 0 disables prefetching
-#maintenance_io_concurrency = 16 # 1-1000; 0 disables prefetching
+#effective_io_concurrency = 16 # 1-1000; 0 disables issuing multiple simultaneous IO requests
+#maintenance_io_concurrency = 16 # 1-1000; same as effective_io_concurrency
#io_max_combine_limit = 128kB # usually 1-128 blocks (depends on OS)
# (change requires restart)
#io_combine_limit = 128kB # usually 1-128 blocks (depends on OS)
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 22b7d31b165..c17fda2bc81 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -1402,11 +1402,6 @@ setup_config(void)
repltok, true);
#endif
-#ifndef USE_PREFETCH
- conflines = replace_guc_value(conflines, "effective_io_concurrency",
- "0", true);
-#endif
-
#ifdef WIN32
conflines = replace_guc_value(conflines, "update_process_title",
"off", true);
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index 867ae9facb5..f2192ceb271 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -158,14 +158,8 @@ extern PGDLLIMPORT int bgwriter_lru_maxpages;
extern PGDLLIMPORT double bgwriter_lru_multiplier;
extern PGDLLIMPORT bool track_io_timing;
-/* only applicable when prefetching is available */
-#ifdef USE_PREFETCH
#define DEFAULT_EFFECTIVE_IO_CONCURRENCY 16
#define DEFAULT_MAINTENANCE_IO_CONCURRENCY 16
-#else
-#define DEFAULT_EFFECTIVE_IO_CONCURRENCY 0
-#define DEFAULT_MAINTENANCE_IO_CONCURRENCY 0
-#endif
extern PGDLLIMPORT int effective_io_concurrency;
extern PGDLLIMPORT int maintenance_io_concurrency;
diff --git a/src/include/utils/guc_hooks.h b/src/include/utils/guc_hooks.h
index 0f1e74f96c9..799fa7ace68 100644
--- a/src/include/utils/guc_hooks.h
+++ b/src/include/utils/guc_hooks.h
@@ -61,8 +61,6 @@ extern bool check_default_text_search_config(char **newval, void **extra, GucSou
extern void assign_default_text_search_config(const char *newval, void *extra);
extern bool check_default_with_oids(bool *newval, void **extra,
GucSource source);
-extern bool check_effective_io_concurrency(int *newval, void **extra,
- GucSource source);
extern bool check_huge_page_size(int *newval, void **extra, GucSource source);
extern void assign_io_method(int newval, void *extra);
extern bool check_io_max_concurrency(int *newval, void **extra, GucSource source);
@@ -83,8 +81,6 @@ extern bool check_log_stats(bool *newval, void **extra, GucSource source);
extern bool check_log_timezone(char **newval, void **extra, GucSource source);
extern void assign_log_timezone(const char *newval, void *extra);
extern const char *show_log_timezone(void);
-extern bool check_maintenance_io_concurrency(int *newval, void **extra,
- GucSource source);
extern void assign_maintenance_io_concurrency(int newval, void *extra);
extern void assign_io_max_combine_limit(int newval, void *extra);
extern void assign_io_combine_limit(int newval, void *extra);