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

Re: Parsing config files in a directory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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:26:28
Message-ID: 27157.1256747188@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Greg Smith <gsmith(at)gregsmith(dot)com> writes:
> 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.

Indeed.  Why in the world are you looking at initdb?  The standard
reference for postgresql.conf-reading code, by definition, is
guc-file.l.  I think the odds of building something that works right,
without borrowing that same flex logic, are about nil.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Greg StarkDate: 2009-10-28 16:39:34
Subject: Re: Parsing config files in a directory
Previous:From: Greg SmithDate: 2009-10-28 16:10:04
Subject: Re: Parsing config files in a directory

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