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 CAA4eK1JymAA=g5RrsBmOC8mgrK=LJJaALa=JwV6QU4hZVTOk9Q@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 8:43 AM, Stephen Frost <sfrost@snowman.net> wrote:
> * Amit Kapila (amit.kapila16@gmail.com) wrote:
>> initdb will create the empty auto file. If we don't enable by default,
>> then if user uses
>> ALTER SYSTEM and do sighup/restart, changed config parameter values
>> will not come into affect
>> until he manually enables it by removing '#' from '#include'.
>
> That's a pretty simple thing to detect and return an ERROR case on
> though.
  Do you mean to say, that when user uses ALTER SYSTEM and include is
disabled, then we can give ERROR in  ALTER SYSTEM, that to reflect the values, he need to enable it?  Actually in
previousversion of patch, there was WARNING on such a condition.  I agree that it can be detected and we issue Warning
orError, but
 
I think it will be an un-necessary inconvenience  for user. However if you still vote for disable by default, I will
modify the patch that way only.

The other part which needs suggestions is about un-safe parameters:
I think for first version of feature, we can decide on some minimum
list of parameters that will be considere un-safe and user will not be
allowed to modify them with ALTER SYSTEM.
To start with we can consider below 4 parameters in that category and
later on keep adding more parameters:
data_directory, listen_addresses, port, shared_buffers.
These are from the list you provided at link:
http://www.postgresql.org/message-id/20130802145442.GB2706@tamriel.snowman.net

I have no strong reason why only these 4 parameters, we can choose
other parameters as well. The only thing is I want to make a base for
this feature and then later we can enhance it as per below points:
a. add more parameters to un-safe category
b. user can view non-modifiable parameters (may be in pg_settings)
c. some way such that if user wants to take risk of server not getting
started, he should allow to modify such parameters (may be with
additional syntax in ALTER SYSTEM .. FORCE as suggested by Greg
Smith).


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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Personal note: taking some vacation time in Sep/Oct
Next
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])