BUG #15396: initdb emits wrong comment for range for effective_io_concurrency

Started by PG Bug reporting formover 7 years ago4 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 15396
Logged by: James Robinson
Email address: james@jlr-photo.com
PostgreSQL version: 11beta3
Operating system: OSX
Description:

inidb in 11 beta4 emits a postgresql.conf with the following:

...
# - Asynchronous Behavior -

#effective_io_concurrency = 0 # 1-1000; 0 disables prefetching
...

But un-commenting and changing to any value other than zero produces:

2018-09-23 15:57:15.960 GMT [33648] LOG: 1 is outside the valid range for
parameter "effective_io_concurrency" (0 .. 0)

Something up here? If not a tunable knob, why describe it and / or have the
misleading comment?

beta4 Installed via macports.

In reply to: PG Bug reporting form (#1)
Re: BUG #15396: initdb emits wrong comment for range for effective_io_concurrency

Hello

effective_io_concurrency can not be set is your system does not support USE_POSIX_FADVISE. In this case only allowed value for effective_io_concurrency is zero.
As far i know mac os does not support posix_fadvise.

Also this is documented behavior https://www.postgresql.org/docs/11/static/runtime-config-resource.html

Asynchronous I/O depends on an effective posix_fadvise function, which some operating systems lack. If the function is not present then setting this parameter to anything but zero will result in an error.

regards, Sergei

#3James Robinson
james@jlr-photo.com
In reply to: Sergei Kornilov (#2)
Re: BUG #15396: initdb emits wrong comment for range for effective_io_concurrency

On Sep 23, 2018, at 2:27 PM, Sergei Kornilov <sk@zsrv.org> wrote:

Hello

effective_io_concurrency can not be set is your system does not support USE_POSIX_FADVISE. In this case only allowed value for effective_io_concurrency is zero.
As far i know mac os does not support posix_fadvise.

Also this is documented behavior https://www.postgresql.org/docs/11/static/runtime-config-resource.html

Asynchronous I/O depends on an effective posix_fadvise function, which some operating systems lack. If the function is not present then setting this parameter to anything but zero will result in an error.

regards, Sergei

Thanks Sergei,

Possibilities of augmenting either the initdb template comments according to if USE_POSIX_FADVISE or not, or perhaps the runtime error (probably harder).

In any event, I agree not a PG11 beta issue. Perhaps I'll craft a pithy patch against HEAD sometime in the future.

James
-----
James Robinson
james@jlr-photo.com
http://jlr-photo.com/

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: James Robinson (#3)
Re: BUG #15396: initdb emits wrong comment for range for effective_io_concurrency

James Robinson <james@jlr-photo.com> writes:

On Sep 23, 2018, at 2:27 PM, Sergei Kornilov <sk@zsrv.org> wrote:
effective_io_concurrency can not be set is your system does not support USE_POSIX_FADVISE. In this case only allowed value for effective_io_concurrency is zero.
As far i know mac os does not support posix_fadvise.

Possibilities of augmenting either the initdb template comments according to if USE_POSIX_FADVISE or not, or perhaps the runtime error (probably harder).

I don't think trying to cram something about this into
postgresql.conf.sample is advisable. Those end-of-line comments need to
be *short*. Plus, you'd almost certainly confuse people as to whether the
info was applicable to them or not. Perhaps a better idea is to rejigger
things so that the bad news is delivered by check_effective_io_concurrency
rather than changing the hard limits of the GUC. Then it'd be possible
to include an errdetail that only zero is supported on platforms that
lack posix_fadvise.

regards, tom lane