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

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Robert Haas'" <robertmhaas(at)gmail(dot)com>
Cc: "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org>
Subject: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Date: 2013-06-13 12:35:17
Message-ID: 009401ce6832$76653200$632f9600$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Friday, June 07, 2013 9:45 AM Amit Kapila wrote:
> On Thursday, June 06, 2013 10:22 PM Robert Haas wrote:
> > On Wed, Jun 5, 2013 at 7:24 AM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
> > wrote:
> > > On Monday, May 27, 2013 4:17 PM Amit Kapila wrote:
> > >> On Wednesday, April 03, 2013 11:55 AM Amit Kapila wote:
> > >> > On Tuesday, April 02, 2013 9:49 PM Peter Eisentraut wrote:
> > >>
> > >
> > > There are 2 options to proceed for this patch for 9.4
> > >
> > > 1. Upload the SET PERSISTENT syntax patch for coming CF by fixing
> > existing
> > > review comments
> > > 2. Implement new syntax ALTER SYSTEM as proposed in below mail
> > >
> > > Could you suggest me what could be best way to proceed for this
> > patch?
> >
> > I'm still in favor of some syntax involving ALTER, because it's still
> > true that this behaves more like the existing GUC-setting commands
> > that use ALTER (which change configuration for future sessions)
> rather
> > the ones that use SET (which change the current settings for some
> > period of time).
>
>
> I will change the patch as per below syntax if there are no objections:
>
> ALTER SYSTEM SET configuration_parameter {TO | =} {value, | 'value'};

Modified patch contains:

1. Syntax implemented is
ALTER SYSTEM SET configuration_parameter {TO | =} {value, | 'value' |
DEFAULT};

If user specifies DEFAULT, it will remove entry from auto conf file.

2. File name to store settings set by ALTER SYSTEM command is still
persistent.auto.conf

3. Added a new page for Alter System command in docs. In compatability
section, I had mentioned that
this statement is an PostgresQL extension. I had tried to search in
SQL-92 spec but couldn't find such command.

4. During test of this patch, I had observed one problem for PGC_BACKEND
parameters like log_connections.
If I change these parameters directly in postgresql.conf and then do
pg_reload_conf() and reconnect, it will
still show the old value. This is observed only on WINDOWS. I will
investigate this problem and update you.
Due to this problem, I had removed few test cases.

Kindly let me know your suggestions.

With Regards,
Amit Kapila.

Attachment Content-Type Size
alter_system.patch application/octet-stream 68.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-06-13 15:06:31 Re: Passing fdw_private data from PlanForeignScan to PlanForeignModify
Previous Message Bernd Helmle 2013-06-13 12:02:54 Passing fdw_private data from PlanForeignScan to PlanForeignModify