On Wednesday 11 June 2003 2:37 pm, Matthew Nuzum wrote: > The problem with this is that in troubleshooting there's no frame of > reference. Having a stock config file, or stock config file options allows > a person to write to the list and say, "hey, I'm using medium.conf and I > have x ram..." > > The alternative is, "hey, see my attached .conf file..." which takes a lot > more effort.
The postfix mail transport agent has a command "postconf" which allows you to read or change entries in the config file. Like postgresql, postfix uses certain defaults when there is no corresponding configuration entry. Running "postconf" displays all settings while "postconf -n" command displays only non-default configuration settings. The output of "postconf -n" is generally one of the first things requested when someone asks a question. (Being a mail server, most questions are ultimately configuration related - postgresql questions are more varied.) You can also change a setting with "postconf parameter=value". Perhaps a similar command would be useful for postgresql. Just please don't call it "postconf". :) Note: this would also provide a nice core interface for all sorts of purposes like updating configuration entries based on automatic analysis of database size/memory/cpu or based on asking the admin questions about the database use profile and then using the command (say pg_conf) to update specified options, save current settings and restore everything to default for testing/troubleshooting then restore the original settings, etc. Looking through the useful options for postconf, I think a useful base set of features for pg_conf would be pg_conf -D datadir [-n] [-h] [-d] [parameter...] Output (unless -h is specified) would look like: foo = 8192 bar = 0 ... where: -n = only output values that are different than the default -h = show the value only (useful for extracting values into scripts, eg, pg_conf -h foo would return "8192" instead of "foo = 8192". Note: I just borrowed -h from postconf - choose any logical letter.) -d = show the default value for the parameter The optional parameter list limits the display to that/those parameter(s). I haven't checked the source code, yet, but I suspect that most of the necessary code for such a command is already in whatever module reads postgresql.conf. Thoughts? Cheers, Steve ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly