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

Re: Parsing config files in a directory

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Parsing config files in a directory
Date: 2009-10-28 03:40:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 10/27/09 8:24 PM, Robert Haas wrote:
> read the old postgresql.conf and
> write it back out to a new file line by line.  If, in the process of
> doing this, you find a setting for the variable you're trying to
> change, then write out the new line in place of the original line. 

You've hit the problem on the head right there.  The requirement to do
something like that is *exactly* the problem which makes writing
config-management tools hard/impossible.

If you require that a tool (or SET PERISTENT) parse through a file in
order to change one setting, then you've just doubled or tripled the
code size of the tool, as well as added a host of failure conditions
which wouldn't have existed otherwise.

You're hearing from the people who are working on tools: requiring that
any tool parse a hand-written config file is a non-starter.

--Josh Berkus

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2009-10-28 03:40:57
Subject: Re: Where's the docs?
Previous:From: Josh BerkusDate: 2009-10-28 03:35:54
Subject: Where's the docs?

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