Re: Proposal for Allow postgresql.conf values to be changed via SQL

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila@huawei.com>
Cc: "'Jaime Casanova'" <jaime@2ndquadrant.com>, "'Fujii Masao'" <masao.fujii@gmail.com>, "'PostgreSQL-development'" <pgsql-hackers@postgresql.org>, "'Dimitri Fontaine'" <dimitri@2ndquadrant.fr>, cedric@2ndquadrant.com, "'Robert Haas'" <robertmhaas@gmail.com>, "'Greg Smith'" <greg@2ndquadrant.com>, "'Josh Berkus'" <josh@agliodbs.com>, "'Magnus Hagander'" <magnus@hagander.net>, "'Christopher Browne'" <cbbrowne@gmail.com>, "'Alvaro Herrera'" <alvherre@2ndquadrant.com>
Date: 2012-12-11T15:21:47Z
Lists: pgsql-hackers
Amit Kapila <amit.kapila@huawei.com> writes:
> On Tuesday, December 11, 2012 5:25 AM Jaime Casanova wrote:
>> can we at least send the source file in the error message when a
>> parameter has a wrong value?
>> 
>> suppose you do: SET PERSISTENT shared_preload_libraries TO
>> 'some_nonexisting_lib';
>> when you restart postgres and that lib doesn't exist you can get
>> confused when looking at postgresql.conf and find an empty string
>> there

> This can be done but for this we need to change internal functions

You'd need to change a whole lot of places to respond to this request.
Frankly it sounds like wishful thinking to me.  In many cases it's not
obvious whether a failure might be triggered by a GUC setting, and I
can't see dumping the whole content of postgresql.conf for any startup
failure.

I don't really believe Jaime's assumption anyway, which seems to be that
people will be too dumb to look at the include files when wondering what
value a setting has.  We've not had reports of such when using the
existing inclusion mechanism.

			regards, tom lane