From: Alvaro Herrera Date: Tue, 24 May 2016 18:55:34 +0000 (-0400) Subject: Fix range check for effective_io_concurrency X-Git-Tag: REL9_6_BETA2~158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c7cd45b6d702253c09427929bcceb6e7fe9029a;p=postgresql Fix range check for effective_io_concurrency Commit 1aba62ec moved the range check of that option form guc.c into bufmgr.c, but introduced a bug by changing a >= 0.0 to > 0.0, which made the value 0 no longer accepted. Put it back. Reported by Jeff Janes, diagnosed by Tom Lane --- diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index c0d5fa74e1..e5dafaf00c 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -514,7 +514,7 @@ ComputeIoConcurrency(int io_concurrency, double *target) *target = new_prefetch_pages; /* This range check shouldn't fail, but let's be paranoid */ - return (new_prefetch_pages > 0.0 && new_prefetch_pages < (double) INT_MAX); + return (new_prefetch_pages >= 0.0 && new_prefetch_pages < (double) INT_MAX); } /*