Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-17 Thread Boszormenyi Zoltan
2013-03-17 17:05 keltezéssel, Greg Smith írta: On 3/14/13 4:48 PM, Boszormenyi Zoltan wrote: The attached patch makes SET PERSISTENT transactional and uses one setting per file. It uses the currently existing parsing and validating code and because of this, the patch is half the size of v12 from

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-17 Thread Greg Smith
On 3/14/13 4:48 PM, Boszormenyi Zoltan wrote: The attached patch makes SET PERSISTENT transactional and uses one setting per file. It uses the currently existing parsing and validating code and because of this, the patch is half the size of v12 from Amit. That's not a completely fair comparison

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-15 Thread Boszormenyi Zoltan
2013-03-15 00:48 keltezéssel, Boszormenyi Zoltan írta: 2013-03-13 21:28 keltezéssel, Boszormenyi Zoltan írta: 2013-03-13 13:45 keltezéssel, Andres Freund írta: On 2013-03-13 09:09:24 +0100, Boszormenyi Zoltan wrote: 2013-03-13 07:42 keltezéssel, Craig Ringer írta: On 03/12/2013 06:27 AM, Crai

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-14 Thread Boszormenyi Zoltan
2013-03-13 21:28 keltezéssel, Boszormenyi Zoltan írta: 2013-03-13 13:45 keltezéssel, Andres Freund írta: On 2013-03-13 09:09:24 +0100, Boszormenyi Zoltan wrote: 2013-03-13 07:42 keltezéssel, Craig Ringer írta: On 03/12/2013 06:27 AM, Craig Ringer wrote: Think also about the case where someone

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-13 Thread Boszormenyi Zoltan
2013-03-13 13:45 keltezéssel, Andres Freund írta: On 2013-03-13 09:09:24 +0100, Boszormenyi Zoltan wrote: 2013-03-13 07:42 keltezéssel, Craig Ringer írta: On 03/12/2013 06:27 AM, Craig Ringer wrote: Think also about the case where someone wants to change multiple values together and having jus

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-13 Thread Andres Freund
On 2013-03-13 09:09:24 +0100, Boszormenyi Zoltan wrote: > 2013-03-13 07:42 keltezéssel, Craig Ringer írta: > >On 03/12/2013 06:27 AM, Craig Ringer wrote: > Think also about the case where someone wants to change multiple > values together and having just some set and not others would be > >

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-13 Thread Andres Freund
On 2013-03-12 10:46:53 +0530, Amit Kapila wrote: > Do you mean to say that because some variables can only be set after restart > can lead to > inconsistency, or is it because of asynchronous nature of pg_reload_conf()? As long as SET PERSISTENT cannot be executed inside a transaction - or only t

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-13 Thread Boszormenyi Zoltan
2013-03-13 09:09 keltezéssel, Boszormenyi Zoltan írta: 2013-03-13 07:42 keltezéssel, Craig Ringer írta: On 03/12/2013 06:27 AM, Craig Ringer wrote: Think also about the case where someone wants to change multiple values together and having just some set and not others would be inconsistent. Ye

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-13 Thread Boszormenyi Zoltan
2013-03-13 07:42 keltezéssel, Craig Ringer írta: On 03/12/2013 06:27 AM, Craig Ringer wrote: Think also about the case where someone wants to change multiple values together and having just some set and not others would be inconsistent. Yeah, that's a killer. The reload would need to be schedul

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-12 Thread Craig Ringer
On 03/12/2013 06:27 AM, Craig Ringer wrote: >> > Think also about the case where someone wants to change multiple >> > values together and having just some set and not others would be >> > inconsistent. > Yeah, that's a killer. The reload would need to be scheduled for COMMIT > time, it can't be do

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-12 Thread Greg Smith
On 3/11/13 12:19 PM, Greg Stark wrote: Think also about the case where someone wants to change multiple values together and having just some set and not others would be inconsistent. Isn't that an argument for syntax to make an exception though? If starting from a blank slate I would say this

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-11 Thread Amit Kapila
On Monday, March 11, 2013 11:02 PM Fujii Masao wrote: > On Mon, Mar 11, 2013 at 4:39 PM, Greg Smith > wrote: > > 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: >

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-11 Thread Craig Ringer
On 03/12/2013 03:19 AM, Greg Stark wrote: > Think also about the case where someone wants to change multiple > values together and having just some set and not others would be > inconsistent. Yeah, that's a killer. The reload would need to be scheduled for COMMIT time, it can't be done by `SET PERS

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-11 Thread Greg Stark
On Mon, Mar 11, 2013 at 7:39 AM, Greg Smith wrote: > 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 restar

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-11 Thread Josh Berkus
> I agree with you if SET PERSISTENT reloads only postgresql.auto.conf. > But in current conf reload mechanism, other configuration files like > pg_hba.conf are also reloaded when pg_read_conf() is executed. Probably > I don't like this behavior. Users might get surprised that the configuration >

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-11 Thread Fujii Masao
On Mon, Mar 11, 2013 at 4:39 PM, Greg Smith wrote: > 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

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-11 Thread Greg Smith
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 dis

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-10 Thread Amit Kapila
On Sunday, March 10, 2013 8:43 PM Greg Smith wrote: > On 3/7/13 2:42 AM, Amit Kapila wrote: > > I also think the tests added for regression may be more than > required... > > If you think above optimization's to reduce number of tests are okay, > then I > > will update the patch. > > I was not try

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-10 Thread Craig Ringer
On 03/10/2013 11:12 PM, Greg Smith wrote: > > 5) An error message appears every time you reload configuration, if > some part of the SET PERSISTENT mechanism isn't functional. This is > going to be too much for some people. And it's confusing when it > happens as part an interactive psql session.

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-10 Thread Greg Smith
On 3/7/13 2:42 AM, Amit Kapila wrote: I also think the tests added for regression may be more than required... If you think above optimization's to reduce number of tests are okay, then I will update the patch. I was not trying to get you to remove regression tests. I was just pointing out to

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-06 Thread Amit Kapila
On Thursday, March 07, 2013 10:54 AM Greg Smith wrote: > On 3/5/13 9:07 AM, Amit Kapila wrote: > > In v11 patch, I have changed name of directory to config. > > For file name, currently I have not changed, but if you feel it needs > to be > > changed, kindly suggest any one of above or if any other

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-06 Thread Greg Smith
On 3/5/13 9:07 AM, Amit Kapila wrote: In v11 patch, I have changed name of directory to config. For file name, currently I have not changed, but if you feel it needs to be changed, kindly suggest any one of above or if any other better you have in mind. This seems fine for now. Hashing out exa

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-04 Thread Craig Ringer
On 03/04/2013 09:07 AM, Greg Smith wrote: > I'm not sure why you are opening the old auto config file with > ParseConfigFp. Can't you just navigate the existing GUCs in memory > and directly write the new one out? If someone is going to manually > edit this file and use SET PERSISTENT, they're go

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-04 Thread Amit Kapila
On Monday, March 04, 2013 6:38 AM Greg Smith wrote: > This submission didn't have any listed reviewers in the CF app. I > added > Zoltan and Andres since both of you went through the usual review steps > and have given lots of feedback. Thank you for review. > There are two main sets of issues

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-03 Thread Amit Kapila
On Monday, March 04, 2013 9:41 AM Craig Ringer wrote: > On 03/04/2013 09:07 AM, Greg Smith wrote: > > I'm not sure why you are opening the old auto config file with > > ParseConfigFp. Can't you just navigate the existing GUCs in memory > > and directly write the new one out? If someone is going t

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-03 Thread Amit Kapila
On Monday, March 04, 2013 7:26 AM Greg Smith wrote: > On 3/3/13 8:34 PM, Tom Lane wrote: > > Neither of those names is consistent with any other PGDATA > subdirectory > > name we use. It should just be config, or perhaps pg_config, though > the > > latter risks confusion with the tool of the same

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-03 Thread Craig Ringer
On 03/04/2013 09:34 AM, Tom Lane wrote: > Josh Berkus writes: >>> I would like to see the name of the directory be conf.d instead of >>> auto.conf.d though. What's "auto" about it? Using that word just adds >>> a source of confusion. The same problem exists with the file name >>> itself. I was

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-03 Thread Greg Smith
On 3/3/13 8:34 PM, Tom Lane wrote: Neither of those names is consistent with any other PGDATA subdirectory name we use. It should just be config, or perhaps pg_config, though the latter risks confusion with the tool of the same name. I'd be just as happy with config/ as the directory name. I

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-03 Thread Tom Lane
Josh Berkus writes: >> I would like to see the name of the directory be conf.d instead of >> auto.conf.d though. What's "auto" about it? Using that word just adds >> a source of confusion. The same problem exists with the file name >> itself. I was hoping for conf.d/persistent.conf here, and n

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-03 Thread Josh Berkus
> = Directory vs. single file = > > The main reason I've advocated a configuration file directory is to try > and suggest a standard for tool generated config files to co-exist in. > This particular feature doesn't *need* that. But in the long term I was > hoping to have more tools that can writ

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-03-03 Thread Greg Smith
This submission didn't have any listed reviewers in the CF app. I added Zoltan and Andres since both of you went through the usual review steps and have given lots of feedback. There are two main sets of issues that keep popping up with this feature: -The implementation seems too long, at aro

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-13 Thread Amit Kapila
On Tuesday, February 12, 2013 9:02 PM Andres Freund wrote: > On 2013-02-12 20:19:43 +0530, Amit Kapila wrote: > > On Tuesday, February 12, 2013 4:55 PM Andres Freund wrote: > > > On 2013-02-12 14:57:51 +0530, Amit Kapila wrote: > > > > On Tuesday, February 12, 2013 11:24 AM Boszormenyi Zoltan wrote

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-12 Thread Josh Berkus
> To be honest, I don't really think thats fair to the patch. I don't see > much that can be made smaller as long as the "one file for all > persistent settings" dogma is upheld which more people seem to vote for > (exluding me). I'm not a fan of "one file to rule them all" either. Hovever, I'm

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-12 Thread Amit Kapila
On Tuesday, February 12, 2013 9:02 PM Andres Freund wrote: > On 2013-02-12 20:19:43 +0530, Amit Kapila wrote: > > On Tuesday, February 12, 2013 4:55 PM Andres Freund wrote: > > > On 2013-02-12 14:57:51 +0530, Amit Kapila wrote: > > > > On Tuesday, February 12, 2013 11:24 AM Boszormenyi Zoltan wrote

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-12 Thread Andres Freund
On 2013-02-12 10:45:28 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2013-02-12 20:19:43 +0530, Amit Kapila wrote: > >> On Tuesday, February 12, 2013 4:55 PM Andres Freund wrote: > >>> 1) You need to grab the lock before the value is checked since some > >>> variables are interdependent (e

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-12 Thread Tom Lane
Andres Freund writes: > On 2013-02-12 20:19:43 +0530, Amit Kapila wrote: >> On Tuesday, February 12, 2013 4:55 PM Andres Freund wrote: >>> 1) You need to grab the lock before the value is checked since some >>> variables are interdependent (e.g. log_statement_stats, wal_level, >>> archive_mode) an

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-12 Thread Andres Freund
On 2013-02-12 20:19:43 +0530, Amit Kapila wrote: > On Tuesday, February 12, 2013 4:55 PM Andres Freund wrote: > > On 2013-02-12 14:57:51 +0530, Amit Kapila wrote: > > > On Tuesday, February 12, 2013 11:24 AM Boszormenyi Zoltan wrote: > > > > This mail lists this order for the single file approach:

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-12 Thread Amit Kapila
On Tuesday, February 12, 2013 4:55 PM Andres Freund wrote: > On 2013-02-12 14:57:51 +0530, Amit Kapila wrote: > > On Tuesday, February 12, 2013 11:24 AM Boszormenyi Zoltan wrote: > > > 2013-02-12 04:54 keltezéssel, Amit Kapila írta: > > > > On Tuesday, February 12, 2013 12:54 AM Andres Freund wrote

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-12 Thread Andres Freund
On 2013-02-12 14:57:51 +0530, Amit Kapila wrote: > On Tuesday, February 12, 2013 11:24 AM Boszormenyi Zoltan wrote: > > 2013-02-12 04:54 keltezéssel, Amit Kapila írta: > > > On Tuesday, February 12, 2013 12:54 AM Andres Freund wrote: > > > Zoltan has reviewed this patch very thoroughly Sorry, the

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-12 Thread Amit Kapila
On Tuesday, February 12, 2013 11:24 AM Boszormenyi Zoltan wrote: > 2013-02-12 04:54 keltezéssel, Amit Kapila írta: > > On Tuesday, February 12, 2013 12:54 AM Andres Freund wrote: > >> On 2013-02-11 11:17:16 -0800, Josh Berkus wrote: > >>> On 02/11/2013 06:33 AM, Boszormenyi Zoltan wrote: > 201

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Boszormenyi Zoltan
2013-02-12 04:54 keltezéssel, Amit Kapila írta: On Tuesday, February 12, 2013 12:54 AM Andres Freund wrote: On 2013-02-11 11:17:16 -0800, Josh Berkus wrote: On 02/11/2013 06:33 AM, Boszormenyi Zoltan wrote: 2013-02-11 15:25 keltezéssel, Andres Freund írta: On 2013-02-11 15:21:13 +0100, Boszor

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Amit Kapila
On Tuesday, February 12, 2013 12:54 AM Andres Freund wrote: > On 2013-02-11 11:17:16 -0800, Josh Berkus wrote: > > On 02/11/2013 06:33 AM, Boszormenyi Zoltan wrote: > > > 2013-02-11 15:25 keltezéssel, Andres Freund írta: > > >> On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: > > >>> 2013-01

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Craig Ringer
On 02/12/2013 03:24 AM, Andres Freund wrote: > Well, several people (at least Tom, I, and I think Zoltan as well) > think that the one-file approach is considerably more complex. Check > http://www.postgresql.org/message-id/20130126162728.ga5...@awork2.anarazel.de > and related messages for some of

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Andres Freund
On 2013-02-11 11:17:16 -0800, Josh Berkus wrote: > On 02/11/2013 06:33 AM, Boszormenyi Zoltan wrote: > > 2013-02-11 15:25 keltezéssel, Andres Freund írta: > >> On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: > >>> 2013-01-24 18:02 keltezéssel, Tom Lane írta: > Andres Freund writes: >

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Josh Berkus
On 02/11/2013 06:33 AM, Boszormenyi Zoltan wrote: > 2013-02-11 15:25 keltezéssel, Andres Freund írta: >> On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: >>> 2013-01-24 18:02 keltezéssel, Tom Lane írta: Andres Freund writes: > On 2013-01-24 11:22:52 -0500, Tom Lane wrote: >> Sa

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Boszormenyi Zoltan
2013-02-11 15:25 keltezéssel, Andres Freund írta: On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: 2013-01-24 18:02 keltezéssel, Tom Lane írta: Andres Freund writes: On 2013-01-24 11:22:52 -0500, Tom Lane wrote: Say again? Surely the temp file is being written by whichever backend is

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Boszormenyi Zoltan
2013-01-26 13:46 keltezéssel, Robert Haas írta: On Thu, Jan 24, 2013 at 12:39 PM, Andres Freund wrote: More people seem to have voted for the single file approach but I still haven't understood why... Me neither. Having an include directory seems good, but I can't think why we'd want to clutt

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Andres Freund
On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: > 2013-01-24 18:02 keltezéssel, Tom Lane írta: > >Andres Freund writes: > >>On 2013-01-24 11:22:52 -0500, Tom Lane wrote: > >>>Say again? Surely the temp file is being written by whichever backend > >>>is executing SET PERSISTENT, and there

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Boszormenyi Zoltan
2013-01-24 18:02 keltezéssel, Tom Lane írta: Andres Freund writes: On 2013-01-24 11:22:52 -0500, Tom Lane wrote: Say again? Surely the temp file is being written by whichever backend is executing SET PERSISTENT, and there could be more than one. Sure, but the patch acquires SetPersistentLock

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-26 Thread Andres Freund
On 2013-01-26 07:46:50 -0500, Robert Haas wrote: > On Thu, Jan 24, 2013 at 12:39 PM, Andres Freund > wrote: > > More people seem to have voted for the single file approach but I still > > haven't understood why... > > Me neither. Having an include directory seems good, but I can't think > why w

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-24 Thread Amit Kapila
On Thursday, January 24, 2013 10:33 PM Tom Lane wrote: > Andres Freund writes: > > On 2013-01-24 11:22:52 -0500, Tom Lane wrote: > >> Say again? Surely the temp file is being written by whichever > backend > >> is executing SET PERSISTENT, and there could be more than one. > > > Sure, but the pa

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-24 Thread Andres Freund
On 2013-01-24 12:30:02 -0500, Tom Lane wrote: > Andres Freund writes: > > Backend A: does SET PERSISTENT foobar =..; > > Backend B: does SET PERSISTENT foobar =..; > > > Now B overwrites the config change A has made as they are all stored in > > the same file. > > Say what? I thought the plan was

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-24 Thread Andres Freund
On 2013-01-24 12:02:59 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2013-01-24 11:22:52 -0500, Tom Lane wrote: > >> Say again? Surely the temp file is being written by whichever backend > >> is executing SET PERSISTENT, and there could be more than one. > > > Sure, but the patch acquire

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-24 Thread Tom Lane
Andres Freund writes: > On 2013-01-24 11:22:52 -0500, Tom Lane wrote: >> Say again? Surely the temp file is being written by whichever backend >> is executing SET PERSISTENT, and there could be more than one. > Sure, but the patch acquires SetPersistentLock exlusively beforehand > which seems fi

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-24 Thread Andres Freund
On 2013-01-24 11:22:52 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2013-01-24 16:45:42 +0530, Amit Kapila wrote: > >>> * Writing the temporary file to .$pid seems like a bad idea, better use > >>> one file for that, SET PERSISTENT is protected by an exclusive lock > >>> anyway. > > >> I

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-24 Thread Tom Lane
Andres Freund writes: > On 2013-01-24 16:45:42 +0530, Amit Kapila wrote: >>> * Writing the temporary file to .$pid seems like a bad idea, better use >>> one file for that, SET PERSISTENT is protected by an exclusive lock >>> anyway. >> I think we can use one temporary file, infact that was one of

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-24 Thread Alvaro Herrera
Amit Kapila escribió: > On Wednesday, January 23, 2013 11:51 PM Alvaro Herrera wrote: > > Yes it is -- the /etc/postgresql// directory (where > > postgresql.conf resides) is owned by user postgres. > > So in that case we can consider postgresql.auto.conf to be in path w.r.t > postgresql.conf inst

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-24 Thread Andres Freund
On 2013-01-24 18:37:29 +0530, Amit Kapila wrote: > On Thursday, January 24, 2013 5:25 PM Andres Freund wrote: > > On 2013-01-24 16:45:42 +0530, Amit Kapila wrote: > > > > * The gram.y changes arround set_rest_(more|common) seem pretty > > > > confused > > > > to me. > > > > > > >E.g. its not poss

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-24 Thread Andres Freund
On 2013-01-24 16:45:42 +0530, Amit Kapila wrote: > > * The gram.y changes arround set_rest_(more|common) seem pretty > > confused > > to me. > > >E.g. its not possible anymore to set the timezone for a function. > > What do you exactly mean by this part of comment. The set_rest_more production i

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-23 Thread Amit Kapila
On Wednesday, January 23, 2013 11:51 PM Alvaro Herrera wrote: > Fujii Masao escribió: > > On Wed, Jan 23, 2013 at 12:24 PM, Amit Kapila > wrote: > > > >> Is it safe to write something in the directory other than data > > >> directory > > >> via SQL? > > >> > > >> postgres user usually has the wri

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-23 Thread Amit Kapila
On Wednesday, January 23, 2013 9:51 PM Fujii Masao wrote: > On Wed, Jan 23, 2013 at 6:18 PM, Amit Kapila > wrote: > > On Tuesday, January 22, 2013 10:14 PM Fujii Masao wrote: > >> When I removed postgresql.auto.conf and restarted the server, > >> I got the following warning message. This is not co

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-23 Thread Andres Freund
On 2013-01-22 12:32:07 +, Amit kapila wrote: > This closes all comments raised till now for this patch. > Kindly let me know if you feel something is missing? I am coming late to this patch, so bear with me if I repeat somethign said elsewhere. Review comments of cursory pass through the patc

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-23 Thread Alvaro Herrera
Fujii Masao escribió: > On Wed, Jan 23, 2013 at 12:24 PM, Amit Kapila wrote: > >> Is it safe to write something in the directory other than data > >> directory > >> via SQL? > >> > >> postgres user usually has the write permission for the configuration > >> directory like /etc/postgresql? > > > >

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-23 Thread Fujii Masao
On Wed, Jan 23, 2013 at 6:18 PM, Amit Kapila wrote: > On Tuesday, January 22, 2013 10:14 PM Fujii Masao wrote: >> When I removed postgresql.auto.conf and restarted the server, >> I got the following warning message. This is not correct because >> I didn't remove "auto.conf.d" from postgresql.conf.

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-23 Thread Fujii Masao
On Wed, Jan 23, 2013 at 12:24 PM, Amit Kapila wrote: > On Tuesday, January 22, 2013 8:25 PM Fujii Masao wrote: >> On Tue, Jan 22, 2013 at 11:07 PM, Amit Kapila >> wrote: >> > On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: >> >> 2013-01-22 13:32 keltezéssel, Amit kapila írta: >> >>

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-23 Thread Amit Kapila
On Tuesday, January 22, 2013 10:14 PM Fujii Masao wrote: > On Tue, Jan 22, 2013 at 11:54 PM, Fujii Masao > wrote: > > On Tue, Jan 22, 2013 at 11:07 PM, Amit Kapila > wrote: > >> On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: > >>> 2013-01-22 13:32 keltezéssel, Amit kapila írta: >

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-22 Thread Amit Kapila
On Tuesday, January 22, 2013 8:25 PM Fujii Masao wrote: > On Tue, Jan 22, 2013 at 11:07 PM, Amit Kapila > wrote: > > On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: > >> 2013-01-22 13:32 keltezéssel, Amit kapila írta: > >> > On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan w

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-22 Thread Fujii Masao
On Tue, Jan 22, 2013 at 11:54 PM, Fujii Masao wrote: > On Tue, Jan 22, 2013 at 11:07 PM, Amit Kapila wrote: >> On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: >>> 2013-01-22 13:32 keltezéssel, Amit kapila írta: >>> > On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan wrote: >

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-22 Thread Fujii Masao
On Tue, Jan 22, 2013 at 11:07 PM, Amit Kapila wrote: > On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: >> 2013-01-22 13:32 keltezéssel, Amit kapila írta: >> > On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan wrote: >> > 2013-01-18 21:48 keltezéssel, Boszormenyi Zoltan írta:

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-22 Thread Amit Kapila
On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: > 2013-01-22 13:32 keltezéssel, Amit kapila írta: > > On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan wrote: > > 2013-01-18 21:48 keltezéssel, Boszormenyi Zoltan írta: > >> 2013-01-18 21:32 keltezéssel, Tom Lane írta: > >>> Bos

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-22 Thread Zoltán Böszörményi
2013-01-22 13:32 keltezéssel, Amit kapila írta: On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan wrote: 2013-01-18 21:48 keltezéssel, Boszormenyi Zoltan írta: 2013-01-18 21:32 keltezéssel, Tom Lane írta: Boszormenyi Zoltan writes: 2013-01-18 11:05 keltezéssel, Amit kapila írta: On us

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-21 Thread Andrew Dunstan
On 01/21/2013 07:05 AM, Magnus Hagander wrote: No, I only use the client. But then I support plenty of things I don't use. Oh, I somehow thought you were. And yes, we all support things we don't use - but it certainly helps if there is *someone* out there who uses it. Having a buildfarm animal

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-21 Thread Magnus Hagander
On Mon, Jan 21, 2013 at 9:01 AM, Andrew Dunstan wrote: > > On 01/21/2013 02:17 AM, Magnus Hagander wrote: > >> >> >> On Jan 21, 2013 3:06 AM, "Craig Ringer" > > wrote: >> > >> > On 01/21/2013 10:03 AM, Craig Ringer wrote: >> > > On 01/19/2013 04:08 AM, Boszormenyi Zol

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-21 Thread Andrew Dunstan
On 01/21/2013 02:17 AM, Magnus Hagander wrote: On Jan 21, 2013 3:06 AM, "Craig Ringer" > wrote: > > On 01/21/2013 10:03 AM, Craig Ringer wrote: > > On 01/19/2013 04:08 AM, Boszormenyi Zoltan wrote: > >> However, I am not sure whether Cygwin provides the mkstemp()

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-20 Thread Magnus Hagander
On Jan 21, 2013 3:06 AM, "Craig Ringer" wrote: > > On 01/21/2013 10:03 AM, Craig Ringer wrote: > > On 01/19/2013 04:08 AM, Boszormenyi Zoltan wrote: > >> However, I am not sure whether Cygwin provides the mkstemp() call or not. > >> Searching... Found bugzilla reports against mkstemp on Cygwin. >

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-20 Thread Amit Kapila
On Monday, January 21, 2013 7:36 AM Craig Ringer wrote: > On 01/21/2013 10:03 AM, Craig Ringer wrote: > > On 01/19/2013 04:08 AM, Boszormenyi Zoltan wrote: > >> However, I am not sure whether Cygwin provides the mkstemp() call or > not. > >> Searching... Found bugzilla reports against mkstemp on Cy

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-20 Thread Craig Ringer
On 01/21/2013 10:03 AM, Craig Ringer wrote: > On 01/19/2013 04:08 AM, Boszormenyi Zoltan wrote: >> However, I am not sure whether Cygwin provides the mkstemp() call or not. >> Searching... Found bugzilla reports against mkstemp on Cygwin. > Is Cygwin a platform that should be targeted for the serve

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-20 Thread Craig Ringer
On 01/19/2013 04:08 AM, Boszormenyi Zoltan wrote: > > However, I am not sure whether Cygwin provides the mkstemp() call or not. > Searching... Found bugzilla reports against mkstemp on Cygwin. Is Cygwin a platform that should be targeted for the server backend these days? I can understand making s

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-18 Thread Amit kapila
On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan wrote: 2013-01-18 21:48 keltezéssel, Boszormenyi Zoltan írta: > 2013-01-18 21:32 keltezéssel, Tom Lane írta: >> Boszormenyi Zoltan writes: >>> 2013-01-18 11:05 keltezéssel, Amit kapila írta: > On using mktemp, linux compilation gives be

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-18 Thread Boszormenyi Zoltan
2013-01-18 21:48 keltezéssel, Boszormenyi Zoltan írta: 2013-01-18 21:32 keltezéssel, Tom Lane írta: Boszormenyi Zoltan writes: 2013-01-18 11:05 keltezéssel, Amit kapila írta: On using mktemp, linux compilation gives below warning warning: the use of `mktemp' is dangerous, better use `mkstemp'

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-18 Thread Boszormenyi Zoltan
2013-01-18 21:32 keltezéssel, Tom Lane írta: Boszormenyi Zoltan writes: 2013-01-18 11:05 keltezéssel, Amit kapila írta: On using mktemp, linux compilation gives below warning warning: the use of `mktemp' is dangerous, better use `mkstemp' So I planned to use mkstemp. Good. On my HPUX box, t

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-18 Thread Tom Lane
Boszormenyi Zoltan writes: > 2013-01-18 11:05 keltezéssel, Amit kapila írta: >> On using mktemp, linux compilation gives below warning >> warning: the use of `mktemp' is dangerous, better use `mkstemp' >> >> So I planned to use mkstemp. > Good. On my HPUX box, the man page disapproves of both,

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-18 Thread Boszormenyi Zoltan
Hi, comments below. 2013-01-18 11:05 keltezéssel, Amit kapila írta: On using mktemp, linux compilation gives below warning warning: the use of `mktemp' is dangerous, better use `mkstemp' So I planned to use mkstemp. Good. In Windows, there is an api _mktemp_s, followed by open call, behave

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-05 Thread Noah Misch
On Sat, Jan 05, 2013 at 08:05:11AM +0100, Boszormenyi Zoltan wrote: > 2013-01-05 05:58 keltez?ssel, Amit kapila ?rta: >> On Friday, January 04, 2013 10:57 PM Boszormenyi Zoltan wrote: >>> In create_conf_lock_file(): >> >>> Can't we add a new LWLock and use it as a critical section instead >>> of wa