Re: Unsupported effective_io_concurrency platforms - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Unsupported effective_io_concurrency platforms
Date
Msg-id 200903282341.n2SNfWl11942@momjian.us
Whole thread Raw
In response to Re: Unsupported effective_io_concurrency platforms  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Unsupported effective_io_concurrency platforms  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Joshua D. Drake wrote:
> > Do we want to give a more informative error message, like "not supported
> > on this platform?"
>
> > The trick will be to fit this into the GUC framework.
>
> You could do it by enforcing the limit in an assign hook, but I'm
> not convinced it's worth the trouble.

I have created a patch to at least display a more helpful message,
without being specific:

    test=> set effective_io_concurrency = 1;
    ERROR:  parameter "effective_io_concurrency" cannot be changed from 0

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v
retrieving revision 1.497
diff -c -c -r1.497 guc.c
*** src/backend/utils/misc/guc.c    9 Mar 2009 14:34:34 -0000    1.497
--- src/backend/utils/misc/guc.c    28 Mar 2009 23:40:52 -0000
***************
*** 4738,4747 ****
                      }
                      if (newval < conf->min || newval > conf->max)
                      {
!                         ereport(elevel,
!                                 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
!                                  errmsg("%d is outside the valid range for parameter \"%s\" (%d .. %d)",
!                                         newval, name, conf->min, conf->max)));
                          return false;
                      }
                  }
--- 4738,4753 ----
                      }
                      if (newval < conf->min || newval > conf->max)
                      {
!                         if (conf->min == conf->max)
!                             ereport(elevel,
!                                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
!                                      errmsg("parameter \"%s\" cannot be changed from %d",
!                                             name, conf->min)));
!                         else
!                             ereport(elevel,
!                                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
!                                      errmsg("%d is outside the valid range for parameter \"%s\" (%d .. %d)",
!                                             newval, name, conf->min, conf->max)));
                          return false;
                      }
                  }
***************
*** 4810,4819 ****
                      }
                      if (newval < conf->min || newval > conf->max)
                      {
!                         ereport(elevel,
!                                 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
!                                  errmsg("%g is outside the valid range for parameter \"%s\" (%g .. %g)",
!                                         newval, name, conf->min, conf->max)));
                          return false;
                      }
                  }
--- 4816,4831 ----
                      }
                      if (newval < conf->min || newval > conf->max)
                      {
!                         if (conf->min == conf->max)
!                             ereport(elevel,
!                                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
!                                      errmsg("parameter \"%s\" cannot be changed from %g",
!                                             name, conf->min)));
!                         else
!                             ereport(elevel,
!                                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
!                                      errmsg("%g is outside the valid range for parameter \"%s\" (%g .. %g)",
!                                             newval, name, conf->min, conf->max)));
                          return false;
                      }
                  }

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 8.4 release notes proof reading 1/2
Next
From: Robert Haas
Date:
Subject: Re: PQinitSSL broken in some use casesf