Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Andres Freund <andres(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Date: 2013-08-20 13:25:14
Message-ID: 20130820132514.GD2706@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Amit Kapila (amit(dot)kapila16(at)gmail(dot)com) wrote:
> On Tue, Aug 20, 2013 at 6:21 PM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> > I'm not particularly set on this.. Why not create the file initially?
> If by default this feature needs to be disabled, then it is not
> must to have at initdb time.

I don't see how the two are related. You could never use two-phase
commit (could even disable it), yet we still create things in the data
directory to support it. Having a file in the data directory which
isn't used by default isn't that big a deal, imv.

> Also you mentioned below line upthread which I understood as you
> don't like idea of creating empty file at initdb
> time:
> "If it's enabled by default, then we need to ship an 'auto' file which is
> empty by default... I don't particularly like that"

What I didn't like was having an empty file be accepted as 'valid', but
you need to have some kind of bootstrap mechanism. Telling users "run
this command and then ignore the warning" is certainly bad. A better
option might be to have a *non-empty* auto.conf be generated, where all
it has in it is some kind of identifier, perhaps even just
"enable_alter_system = on" which we could then key off of to see if
ALTER SYSTEM has been set up to be allowed or not.

> I think if we choose to use include directive as a way to
> enable/disable this feature, it will not be good to allow change of
> this parameter with Alter System.

I agree, but then we need to add it to the list of things ALTER SYSTEM
can't modify (if the include is implemented as a GUC, that is; I've not
looked).

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2013-08-20 13:32:11 Re: PL/pgSQL PERFORM with CTE
Previous Message Pavel Stehule 2013-08-20 13:18:58 Re: PL/pgSQL PERFORM with CTE