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

From Amit Kapila
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
Msg-id CAA4eK1LDG9VfkpWkwT8LwibNcJt60Gm0KrWSO1fsFe52HaHhkA@mail.gmail.com
Whole thread Raw
In response to Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])  (Stephen Frost <sfrost@snowman.net>)
Responses Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On Tue, Aug 20, 2013 at 6:21 PM, Stephen Frost <sfrost@snowman.net> wrote:
> * Amit Kapila (amit.kapila16@gmail.com) wrote:
>> Okay, let us decide how things will be if we disable by default:
>>    1. initdb won't create any empty auto file, rather the file will be
>> created first time user uses ALTER SYSTEM.
>
> 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.  OTOH if we want to enable it by default, then we need to get this
created at initdb time else it will give error during  system startup (an error can occur during startup when it will
parse postgresql.conf and didn't find the file  mentioned in include directive).
  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'
filewhich is   empty by default...  I don't particularly like that"
 


>>    2. Alter system should issue warning, if it detects that feature is
>> disabled (for this we need to error detection code
>>        during parsing of postgresql.conf as it was previously)
>
> I agree that it should complain through a warning or perhaps an error
> (to be honest, I like error more, but there may be good reasons against
> that).
>
>>    3. postgresql.conf will contain include directive in below form:
>>        #include = 'postgresql.auto.conf'
>>        Whenever user wants to use Alter System, he needs to enable it
>> after first time using ALTER SYSTEM.
>
> That I don't like..  You should be able to enable it and have things
> "work" without having to run ALTER SYSTEM first..
  This was actually linked to point 1 mentioned above, if we create
empty file at initdb time, then there should not be  any problem.
  One other option to disable as suggested by Alvaro is have another
config parameter to enable/disable Alter  System, if we can do that way, the solution will be much neater.

>> One question here, if somebody just enables it without using ALTER
>> SYSTEM, should it throw any error on not finding auto file or just
>> ignore it?
>
> I'd prefer that it error if it can't find an included file.
>
>> > What about include directives?
>>
>> Sorry, I didn't get which parameters you are referring by include directives?
>
> Literally, the above 'include' in postgresql.conf.  Would that only be
> dealt with as a parse-time thing, or should it be more like a GUC which
> could then be set through ALTER SYSTEM?
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.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Next
From: "David E. Wheeler"
Date:
Subject: Re: PL/pgSQL PERFORM with CTE