Re: Overhauling GUCS

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Decibel! <decibel(at)decibel(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-04 20:39:37
Message-ID: Pine.GSO.4.64.0806041045520.2258@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2008-06-04 20:40:49 Re: Overhauling GUCS
Previous Message Tom Lane 2008-06-04 20:37:18 Re: Proposal: new function array_init