Re: Re: 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: "'Andres Freund'" <andres(at)2ndquadrant(dot)com>, "'Greg Stark'" <stark(at)mit(dot)edu>
Cc: "'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>, "'Josh Berkus'" <josh(at)agliodbs(dot)com>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: 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-02 11:38:12
Message-ID: 00cb01ce8f74$c6136060$523a2120$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, August 01, 2013 8:37 PM Andres Freund wrote:
> Hi,
>
> On 2013-08-01 15:40:22 +0100, Greg Stark wrote:
> > Why isn't it enough to just dump out all variables with a source of
> alter
> > system to a text file? You can either have a single global lock
> around that
> > operation or write it to a new file and move it into place.
>
> It saves you from several complications:
> * No need to iterate over all GUCs, figuring out which come from which
> source, when writing out the file.

Not all GUC's, only which are in auto file.

> * Less logic required when writing out a value, since you have an
> acceptable input ready.
> * No need to make sure the autogenerated file is written out in the
> same
> order when adding/changing a setting (to make sure you can
> diff/version control it sensibly)
> * No locking necessary, without locking concurrent changes can vanish.
> * Way easier to delete a setting if it ends up stopping postgres from
> starting.

The logic needed in current patch for above points is not all that
complex that it
needs to be thought of redesign until the basic idea of
one-file-per-setting scores high
over one-file-all-setting.

Below are some points in my mind due to which I have supported/implemented
one-file-all-setting approach:
a. I had heard quite a few times that Postgres has lot of files (each
relation has separate file) as compare to Oracle.
Users feel that Oracle's table space approach is better.
b. While server start/Sighup, we needs to open/read/close each file
separately which in-itself seems to be overhead.

I believe what Greg Stark has said in his below mail link is the more
appropriate way and the current patch has done that way.
http://www.postgresql.org/message-id/CAM-w4HP7=a2VowyJUD0CAZL5b8FsaHymdQeouL
udSOhdnCw_zg(at)mail(dot)gmail(dot)com

Also when other commercial database (Oracle) can do it with single file,
users will try to compare with it.

I understand that our views are not matching on this point and I totally
respect your views, but not able to convince myself
for one-file-per-setting approach. Can you please once again think and see
if there is a viable way for moving forward.
I had modified the patch for many suggestions which had made it simpler and
if you have any idea to make one-file-all-settings
implementation better, then I can address it.

With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2013-08-02 11:44:01 Re: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Previous Message Cédric Villemain 2013-08-02 10:46:53 Re: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])