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

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Amit kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "cedric(at)2ndquadrant(dot)com" <cedric(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Smith <greg(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Christopher Browne <cbbrowne(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL
Date: 2012-11-22 16:39:26
Message-ID: CAHGQGwFt6auYrUvUmcxuvy909wkOOHLE40ryvdL1Reff8mfKNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 22, 2012 at 9:38 PM, Amit kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
> Patch to implement SET PERSISTENT command is attached with this mail.
> Now it can be reviewed.

I got the following compile warnings:
xact.c:1847: warning: implicit declaration of function
'AtEOXact_UpdateAutoConfFiles'
guc.c:5134: warning: enumeration value 'PGC_ENUM' not handled in switch

"SET PERSISTENT name TO value" failed, though "SET PERSISTENT name = value"
succeeded.

=# SET PERSISTENT synchronous_commit TO 'local';
ERROR: syntax error at or near "TO"
LINE 1: SET PERSISTENT synchronous_commit TO 'local';
=# SET PERSISTENT synchronous_commit = 'local';
SET

SET PERSISTENT succeeded even if invalid setting value was set.

=# SET PERSISTENT synchronous_commit = 'hoge';
SET

SET PERSISTENT syntax should be explained by "\help SET" psql command.

When I remove postgresql.auto.conf, SET PERSISTENT failed.

=# SET PERSISTENT synchronous_commit = 'local';
ERROR: failed to open "postgresql.auto.conf" file

We should implement "RESET PERSISTENT"? Otherwise, there is no way
to get rid of the parameter setting from postgresql.auto.conf, via SQL. Also
We should implement "SET PERSISTENT name TO DEFAULT"?

Is it helpful to output the notice message like 'Run pg_reload_conf() or
restart the server if you want new settings to take effect' always after
SET PERSISTENT command?

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2012-11-22 16:57:01 Re: [PATCH] Make pg_basebackup configure and start standby [Review]
Previous Message Heikki Linnakangas 2012-11-22 16:30:28 Re: [v9.3] Extra Daemons (Re: elegant and effective way for running jobs inside a database)