no_fadvise_better_warning_bug_15396.patch
application/octet-stream
Filename: no_fadvise_better_warning_bug_15396.patch
Type: application/octet-stream
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/backend/utils/misc/guc.c | 6 | 1 |
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index e9f542cfed..bc3df736e5 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2651,7 +2651,7 @@ static struct config_int ConfigureNamesInt[] =
#ifdef USE_PREFETCH
1, 0, MAX_IO_CONCURRENCY,
#else
- 0, 0, 0,
+ 0, 0, MAX_IO_CONCURRENCY,
#endif
check_effective_io_concurrency, assign_effective_io_concurrency, NULL
},
@@ -10709,6 +10709,11 @@ check_effective_io_concurrency(int *newval, void **extra, GucSource source)
else
return false;
#else
+ if (*newval != 0)
+ {
+ GUC_check_errdetail("effective_io_concurrency can only be set to 0 on platforms which lack posix_advise()");
+ return false;
+ }
return true;
#endif /* USE_PREFETCH */
}