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

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, 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-24 12:38:36
Message-ID: 20130824123836.GA16380@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 23, 2013 at 06:41:04PM +0530, Amit Kapila wrote:
> > Not with this proposal... If it's fixed then it makes no sense to make it
> > look like it can be modified.
>
> This proposal is to have a special include which user can only use
> for enable/disable
> which means he can remove symbol '#' or add '#'.
> We cannot stop user from changing file name or add some different
> location, but that can lead to problems.
> We can have a note on top of this include indicating it is only for
> enable/disable.

Note, my whole purpose for suggesting something like:

include_auto_conf_file postgresql.auto.conf

is because I want the file location to be configurable. If I put in my
configuration:

include_auto_conf_file /etc/postgresql/9.4/postgresql.auto.conf

it better put the options there. And if I comment the line out ALTER
SYSTEM should stop working. If I put it at the beginning of the config
then any other option in the file will override it (which we can detect
and warn about). If I put it at the end of the file, ALTER SYSTEM
overrides any statically configured options.

And I can imagine hosting providers putting the configuration for
memory usage, shared library directories and other such options after,
and options like cpu_cost, enable_merge_join, etc before. That way
they have fine grained control over which options the user can set and
which not.

> I think if we add more meaning to it, like allow user to change it,
> handling and defining of that will be bit complex.

Letting the user configure the location seems like common curtesy. Note
this line isn't in itself a GUC, so you can't configure it via ALTER
SYSTEM.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.
-- Arthur Schopenhauer

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2013-08-24 12:40:42 PL/pgSQL PERFORM with CTE
Previous Message Sawada Masahiko 2013-08-24 09:16:19 Re: Behaviour of take over the synchronous replication