From: | Greg Smith <greg(at)2ndQuadrant(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com> |
Cc: | 'Andres Freund' <andres(at)2ndquadrant(dot)com>, 'Boszormenyi Zoltan' <zb(at)cybertec(dot)at>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review] |
Date: | 2013-03-11 07:39:58 |
Message-ID: | 513D8A4E.5030405@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 3/11/13 2:48 AM, Amit Kapila wrote:
>> 1) When you change a sighup or user setting, it writes the config file
>> out. But it does not signal for a reload. Example:
>
> I think we cannot guarantee even after calling pg_reload_conf(), as this is
> an
> asynchronous function call.
> We already once had a discussion about this point and as I can understand it
> is
> concluded that it should not be handled. Refer the below mail:
> http://www.postgresql.org/message-id/21869.1360683928@sss.pgh.pa.us
I wasn't complaining that the change isn't instant. I understand that
can't be done. But I think the signal to reload should be sent. If
people execute SET PERSISTENT, and it doesn't actually do anything until
the server is next restarted, they will be very surprised. It's OK if
it doesn't do anything for a second, or until new sessions connect,
because that's just how SIGHUP/session variables work. That's a
documentation issue. Not reloading the config at all, I think that's
going to trigger a ton of future support problems.
> 2 things, you want as part of this comment:
> a. change the name of .auto file to persistent.auto.conf
> b. new comment in beginning of persistent.auto.conf file.
Right. config/persistent.auto.conf seems like it addresses everyone's
ideas on how the file should be named. If there's a warning not to edit
it in the file, too, it would be making obvious to users what is
happening. The file handles persistent changes, it's automatically
configured, and it's a config file. Putting "postgresql" in the name
seems unnecessary to me.
>> The check for the include_dir entry needs to happen each time SET
>> PERSISTENT runs.
> This can be handled, but for this we need to parse the whole postgresql.conf
> file
> and then give the warning. This will increase the time of SET PERSISTENT
> command.
I don't think that's a problem. I can run the command 1800 times per
second on my laptop right now. If it could only run once per second,
that would still be fast enough. Doing this the most reliable way it
can be handled is the important part; if that happens to be the slowest
way, too, that is acceptable.
--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2013-03-11 08:12:02 | Re: Btrfs clone WIP patch |
Previous Message | Amit Kapila | 2013-03-11 06:48:10 | Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review] |