Re: Permanent settings

From: Aidan Van Dyk <aidan(at)highrise(dot)ca>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, pgsql-hackers(at)postgresql(dot)org, Gregory Stark <stark(at)enterprisedb(dot)com>, Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Subject: Re: Permanent settings
Date: 2008-02-20 19:28:06
Message-ID: 20080220192806.GP7567@yugib.highrise.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Magnus Hagander <magnus(at)hagander(dot)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 be touched)
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(at)highrise(dot)ca command like a king,
http://www.highrise.ca/ work like a slave.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christian Robottom Reis 2008-02-20 19:43:32 Re: CVS repository invalid revision
Previous Message Magnus Hagander 2008-02-20 19:03:43 Re: Permanent settings