Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id DD95C2E007C for ; Wed, 4 Jun 2008 12:11:09 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 45431-01 for ; Wed, 4 Jun 2008 12:10:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by developer.postgresql.org (Postfix) with ESMTP id 1CE842E0072 for ; Wed, 4 Jun 2008 12:10:50 -0300 (ADT) Received: from pse.dyndns.org (p548F1159.dip0.t-ipconnect.de [84.143.17.89]) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis) id 0ML29c-1K3udJ2iDD-0004zn; Wed, 04 Jun 2008 17:10:44 +0200 Received: from [192.168.0.2] (helo=[192.168.0.2]) by pse.dyndns.org with esmtp (Exim 4.44) id 1K3udI-0001VC-AD; Wed, 04 Jun 2008 17:10:36 +0200 Message-ID: <4846B06D.8030101@pse-consulting.de> Date: Wed, 04 Jun 2008 17:10:37 +0200 From: Andreas Pflug User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Aidan Van Dyk CC: "Decibel!" , Tom Lane , Greg Smith , Peter Eisentraut , pgsql-hackers@postgresql.org, Josh Berkus Subject: Re: Overhauling GUCS References: <48409D1E.3070208@agliodbs.com> <200806010032.53337.peter_e@gmx.net> <17932.1212415926@sss.pgh.pa.us> <20080604131810.GH65238@decibel.org> <4846A483.8000001@pse-consulting.de> <20080604143548.GE14498@yugib.highrise.ca> In-Reply-To: <20080604143548.GE14498@yugib.highrise.ca> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+5BKvmqjnEO2zeQSYDDnTQ0jC6Ije7+3lJ74P bJz2bNnjbo6GZcPxNCRZm4x2S6DZ+s2H1NBKPnud4h56fz26o4 pyh6uhPEp9igowQyz4jpg== X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/149 X-Sequence-Number: 119262 Aidan Van Dyk wrote: > * Andreas Pflug [080604 10:20]: > > >> Hiding the storage of config parameters opaquely behind an API is >> something I've been hating for a long time on win32. >> > > ;-) > > >> When reading this thread, I'm wondering if anybody ever saw a config >> file for a complex software product that was easily editable and >> understandable. I don't know one. If there was one, it'd be nice to know >> it so we can learn from it. >> > > PostreSQL, Apache, X.org > > They are all easily editable, and "understandable", in the sense that I > understand that I'm supposed to edit the line, changing the value > (following the comments list of accepted values) > > They are "less understandable" if you mean that I know the implications > of any change I make. But guess what, having those values inputed > through some other mechanism (like a GUI config file editor, a SQL statement, > or a nice pgadmin-SQL-hiding-interface isn't going to change that part > of "understandable". That part of understandable only comes through > good documentation and reference material, which is universally > applicable to any config method. > Right. On the editing side, a column "link" in pg_settings that can be used to construct an URL to postgresql.org/docs/xxx#yyy could help creating editors that support the user. Whatever a text config file will look like, you need to know exactly which parameter to use and where to locate it; even structuring parameters won't help too much for the typical starter task "I installed pgsql, what to do next". > >> IMHO the best compromise in machine and human readability is an XML >> format. It's easily decorateable with comments, easily interpreted and a >> pg_settings view could enhance it with even more comments, so an editor >> using pgsql functions (to read and write postresql.conf.xml) could be >> enabled to supply comprehensive help. >> > > Well, In my past, I've generally not got around to installing and using > software that reqired me to edit some jumble of XML. Ya, maybe I'm > lucky. And since I've got a lot invested in PG, I'ld be forced to of PG > moved to an XML config, but I'ld be forced to kicking and screaming... > > I just *know* that I'ld reload/restart postmaster some time, and the > config file wouldn't be quite correct, and I'ld search for 10 minutes > trying to find the extra (or lack) ", or missing closing /... But maybe > most people are better at parsing XML than me. And that also may be > because I've actively avoided it for so long ;-) > Well I'm an XML evangelist either. But the usual "commenting out a parameter will reset it to default on reload, no?" caveat isn't funny either, or duplicate parameter settings scattered throughout your file. This may be avoided by *preferably* editing the parameters through pgsql itself; the current postgresql.conf file format isn't too machine write friendly (as I know since I wrote the pgadmin config file editor). But having a config file that can't be used with simple editors at all is a nightmare. Regards, Andreas