Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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 

Poking around with Google for a bit, here's a reasonable sample:

> 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."

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 

* Greg Smith gsmith(at)gregsmith(dot)com Baltimore, MD

In response to


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group