Re: Parsing config files in a directory

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parsing config files in a directory
Date: 2009-10-28 16:10:04
Message-ID: alpine.GSO.2.01.0910281152410.14778@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 28 Oct 2009, Alvaro Herrera wrote:

> Huh, isn't this code in initdb.c already?

The sketched out design I have for a contrib/pgtune in C presumes that I'd
start by refactoring the relevant bits from initdb into a library for both
programs to use. But the initdb code doesn't care about preserving
existing values when making changes to them; it just throws in its new
settings and moves along. So what's there already only handles about half
the annoying parts most people would expect a tuning tool that reads the
existing file and operates on it to do.

Also, I wouldn't be surprised to find that it chokes on some real-world
postgresql.conf files. The postgresql.conf.sample it's being fed is
fairly pristine. A tuning tool that intends to read any postgresql.conf
it's fed can't always assume it's in exactly standard form. I've recently
started collecting complicated postgresql.conf lines that crashed my
Python code as people submit bug reports with those. You might be
surprised at all of the places people put whitespace at.

--
* 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 Tom Lane 2009-10-28 16:26:28 Re: Parsing config files in a directory
Previous Message Tom Lane 2009-10-28 15:22:36 FOR UPDATE versus outer joins