Re: Unsafe GUCs and ALTER SYSTEM WAS: Re: ALTER SYSTEM SET

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Bruce Momjian'" <bruce(at)momjian(dot)us>, "'Greg Smith'" <greg(at)2ndQuadrant(dot)com>
Cc: "'Josh Berkus'" <josh(at)agliodbs(dot)com>, "'Stephen Frost'" <sfrost(at)snowman(dot)net>, "'Greg Stark'" <stark(at)mit(dot)edu>, "'Andres Freund'" <andres(at)2ndquadrant(dot)com>, "'Alvaro Herrera'" <alvherre(at)2ndquadrant(dot)com>, "'Fujii Masao'" <masao(dot)fujii(at)gmail(dot)com>, "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "'Dimitri Fontaine'" <dimitri(at)2ndquadrant(dot)fr>, <pgsql-hackers(at)postgresql(dot)org>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Unsafe GUCs and ALTER SYSTEM WAS: Re: ALTER SYSTEM SET
Date: 2013-08-07 03:44:02
Message-ID: 004501ce9320$5c8e4fb0$15aaef10$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, August 07, 2013 8:01 AM Bruce Momjian wrote:
> On Tue, Aug 6, 2013 at 09:24:47PM -0400, Greg Smith wrote:
> > # ALTER SYSTEM SET shared_buffers = ‘8GB’ FORCE;
> > NOTICE: Changing shared_buffers only takes effect after a server
> restart.
> > ALTER SYSTEM
> >
> > Will bad examples pop up in the Internet that just use FORCE all the
> > time? Sure they will, and people will cut and paste them without
> > paying attention. I don't see why that possibility has to block
> > this feature from being adopted though. That line of thinking leads
> > toward removing trust authentication, because that's similarly
> > abused with cut and paste tutorials.
>
> We already have six levels of GUC settings:
>
> postgresql.conf
> user
> database
> session
> function
> subtransaction
>
> If we add ALTER SYSTEM SET and config.d, we would then have eight.
> ALTER SYSTEM SET seems to add an entirely new set of behaviors and
> complexity. Is that really what we want?
>
> If we do this, perhaps we should unconditionally just print the file
> name they have to delete to undo the operation in case the server
> doesn't start; I am unclear we can clearly identify all the GUC
> settings that could cause a server not to start.

> Also, I think we need
> a SHOW SYSTEM command so users can see their settings via SQL.

Although users can see the settings in pg_settings as it has sourcefile, but such a command can
be useful.

> FYI, ALTER SYSTEM SET is hitting the same problems we would have if
> pg_hba.conf were set in SQL and in flat files.

With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2013-08-07 05:41:17 Re: how to pass data (tuples) to worker processes?
Previous Message Amit Kapila 2013-08-07 03:40:31 Re: Unsafe GUCs and ALTER SYSTEM WAS: Re: ALTER SYSTEM SET