From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Greg Smith <gsmith(at)gregsmith(dot)com>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, "Decibel!" <decibel(at)decibel(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Josh Berkus <josh(at)agliodbs(dot)com> |
Subject: | Re: Overhauling GUCS |
Date: | 2008-06-12 02:34:25 |
Message-ID: | 200806120234.m5C2YP324269@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Tom Lane wrote:
> >> The idea has a fundamental logical flaw, which is that it's not clear
> >> which parameter wins if the user changes both.
>
> > Yes, you could get into problems by having variable dependency loops,
>
> Who said anything about loops? What I am talking about is what happens
> during
> set memory_usage = X; // implicitly sets work_mem = X/100, say
> set work_mem = Y;
> set memory_usage = Z;
My initial thought was that this would behave like a shell script
variable, meaning once you set something it would affect all references
to it below in postgresql.conf. The problem with that is that we
comment out all settings, so there isn't a logical order like you would
have in a shell script.
I was not thinking of memory_usage implicity changing anything. I
figured postgresql.conf would have:
memory_usage = 100
work_mem = $memory_usage * 0.75
If you change memory_usage via SET, it will not change work_mem at all
because you are not re-initializing the variables.
I am kind of lost how this would work logically and am willing to think
about it some more, but I do think we aren't going to simplify
postgresql.conf without such a facility.
The big problem I see is that right now everything has a constant
default. If we allowed memory_usage to change some of the defaults, how
would we signal that we want the variables based on it to change their
values? This is your behind-the-scenes problem you mentioned.
> What is work_mem now, and what's your excuse for saying so, and how
> will you document the behavior so that users can understand it?
> (Just to make things interesting, assume that some of the above SETs
> happen via changing postgresql.conf rather than directly.)
>
> If the objective is to make configuration easier to understand,
> I don't believe that behind-the-scenes changes of configuration values
> will advance that goal.
>
> > but I see no way to easily improve configuration without it.
>
> The higher-level concepts should be things that a configuration wizard
> works with, and then tells you how to set the postmaster parameters.
> They should not end up in the configure file (unless maybe as comments?)
I am concerned that each wizzard is going to have to duplicate the same
logic each time, and adjust to release-based changes. I thought having
the configuration file itself help with setting some values would be
helpful.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-06-12 02:36:11 | Re: Overhauling GUCS |
Previous Message | Tom Lane | 2008-06-12 02:05:39 | Re: .psqlrc output for \pset commands |