[REVIEW] Re: postgresql.auto.conf read from wrong directory
От | Abhijit Menon-Sen |
---|---|
Тема | [REVIEW] Re: postgresql.auto.conf read from wrong directory |
Дата | |
Msg-id | 20140616145900.GA13823@toroid.org обсуждение исходный текст |
Ответ на | Re: postgresql.auto.conf read from wrong directory (Amit Kapila <amit.kapila16@gmail.com>) |
Список | pgsql-hackers |
Hi. Just a few minor comments about your patch: At 2014-06-13 11:46:21 +0530, amit.kapila16@gmail.com wrote: > > + <title>Notes</title> > + > + <para> > + This command will not allow to set parameters that are disallowed or > + excluded in postgresql.conf. It also disallows to set configuration > + parameter <xref linkend="guc-data-directory">. > + </para> > + </refsect1> I suggest the following wording: This command may not be used to set <xref linkend="guc-data-directory"> or any parameters that are not allowed inpostgresql.conf. > + /* > + * Disallow parameter's that are excluded or disallowed in > + * postgresql.conf. > + */ "parameters", no apostrophe. > if ((record->context == PGC_INTERNAL) || > - (record->flags & GUC_DISALLOW_IN_FILE)) > - ereport(ERROR, > - (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM), > - errmsg("parameter \"%s\" cannot be changed", > - name))); > + (record->flags & GUC_DISALLOW_IN_FILE) || > + (record->flags & GUC_DISALLOW_IN_AUTO_FILE) || > + (record->flags & GUC_NOT_IN_SAMPLE)) > + ereport(ERROR, > + (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM), > + errmsg("parameter \"%s\" cannot be changed", > + name))); I looked at the settings that are marked GUC_NOT_IN_SAMPLE but neither PGC_INTERNAL nor GUC_DISALLOW_IN_*FILE. I don't feel strongly about it, but I don't see any particularly good reason to exclude them here. (I also agree with Fujii-san that it isn't worth making extensive changes to avoid data_directory being offered via tab-completion.) -- Abhijit
В списке pgsql-hackers по дате отправления: