Re: Permanent settings - Mailing list pgsql-hackers

From Aidan Van Dyk
Subject Re: Permanent settings
Date
Msg-id 20080220192806.GP7567@yugib.highrise.ca
Whole thread Raw
In response to Re: Permanent settings  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Permanent settings  (Alexey Klyukin <alexk@commandprompt.com>)
List pgsql-hackers
* Magnus Hagander <magnus@hagander.net> [080220 14:03]:

> > I think the first step is really for some people to show code that
> > "rewrites" the config file changing a setting reliably and correctly.
> 
> But what we're donig now is discussing *how to do that*, no?

Sort of, but of course, we're getting caught up in extra syntactic
stuff..

If someone *is* writing this config-rewriter now, these are the types of
quesitons I think they need to be asking, some of which have been
touched on, some not.  But I think a first cut could pick any answer for
them, and still be easily adaptable...

1) What file to we "rewrite"?  Main one, or some other specified one?
2) Do we follow includes to find our setting?
3) Which setting do we change, the 1st, or last found in the config  file?
4) What do we do about comments *on the same line* as the setting we're  changing (I'm assuming all other lines won't
betouched)
 
5) How do we want to handle errors like "ENOSPC", or EPERM (I'm assuming  of course that the file rewrite will be a
tmp+rename,not a trunc+write)
 
6) Do we want to distinguish between "restart only" settings, and  reloadable settings, and if so, how?

a.
-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Permanent settings
Next
From: Christian Robottom Reis
Date:
Subject: Re: CVS repository invalid revision