[REVIEW] Re: postgresql.auto.conf read from wrong directory

From: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christoph Berg <cb(at)df7cb(dot)de>, Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: [REVIEW] Re: postgresql.auto.conf read from wrong directory
Date: 2014-06-16 14:59:00
Message-ID: 20140616145900.GA13823@toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

Just a few minor comments about your patch:

At 2014-06-13 11:46:21 +0530, amit(dot)kapila16(at)gmail(dot)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 in postgresql.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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-06-16 15:17:21 WIP patch for multiple column assignment in UPDATE
Previous Message Kevin Grittner 2014-06-16 14:44:11 Re: API change advice: Passing plan invalidation info from the rewriter into the planner?