Re: Overhauling GUCS - Mailing list pgsql-hackers

From Greg Smith
Subject Re: Overhauling GUCS
Date
Msg-id Pine.GSO.4.64.0806041045520.2258@westnet.com
Whole thread Raw
In response to Re: Overhauling GUCS  (Andreas Pflug <pgadmin@pse-consulting.de>)
Responses Re: Overhauling GUCS  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 4 Jun 2008, Andreas Pflug wrote:

> 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 would recommend Apache's httpd.conf as an example of something that's 
easy to edit and follow.  Like any complex product, the comments in the 
configuration file itself can't possibly be sufficient by themselves. 
But in general I've found Apache's config file to have enough comments to 
jog my memory when I'm editing it while not being overwhelming.  They 
provide enough detail that when I run into a setting I don't understand 
there's enough context provided that it's easy to search for more 
information.

Poking around with Google for a bit, here's a reasonable sample: 
http://webdav.org/goliath/dav_on_x/apache.conf

> IMHO the best compromise in machine and human readability is an XML format.

If the primary PostgreSQL configuration file becomes XML I will quit 
working with the project.  I'm not kidding.  If you think XML is easy to 
generate, edit by hand, and use revision control on, we are at such an 
fundamental disagreement that I wouldn't even try and directly argue with 
you.  Instead I'll quote Eric Raymond:

"The most serious problem with XML is that it doesn't play well with 
traditional Unix tools. Software that wants to read an XML format needs an 
XML parser; this means bulky, complicated programs." 
http://www.catb.org/esr/writings/taoup/html/ch05s02.html#id2907018

Let me suggest the following requirement instead which naturally rules it 
out:  it should be possible for a DBA-level coder to write a simple shell 
script that does something useful with the configuration file in order for 
having a text-based configuration to be useful in this context.  To give a 
simple example, I can write a single line [sed|awk|perl] command that will 
let me update the value for one parameter in the current postgresql.conf 
file.  When you can give me a one-liner that does that on an XML file in 
any shell language in that class, then we might have something to talk 
about.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal: new function array_init
Next
From: "David E. Wheeler"
Date:
Subject: Re: Overhauling GUCS