Le mardi 19 février 2008, Gregory Stark a écrit :
> "Magnus Hagander" <magnus(at)hagander(dot)net> writes:
> > Yeah, that may actually be a very good way to implement it. I don't like
> > the idea of continously appending to an existing file, but if we did have
> > a separate file with a tightly controlled format that would be doable.
> Separating the automatically written configuration and the explicit user
> configuration is definitely the right approach. My experience comes from
> Debian where packages editing their own configuration files is verboten.
> Otherwise you run into problems reconciling user-made changes and automatic
> The include file method is workable but isn't perfect. What happens if a
> user connects with pgadmin and changes a parameter but that parameter is
> overridden by a variable in the config file?
> The alternative is to have two files and read them both. Then if you change
> a variable which is overridden by the other source you can warn that the
> change is ineffective.
Ok, here's another idea, which only merits could well be to be different :)
What about having a postgresql.conf.d directory containing a file per setting,
maybe with a subdir per section. If I take Josh Berkus example, we'd have
Each file would then only contains the parameter value, with or without
comments in it, e.g.:
# This is a long comment about why we moved to syslog because of
# blah blah blah blah lah
This would solve a part of the configuration file parsing issues and I think
would ease much of the 'make it all automatic and writable by backends, and
still editable by user without too much confusion in the file(s)', but does
nothing about Magnus remarks about comments (mis-)organisation in the file.
Or we could force the files format to have the value in the first line, no
comments and values on the same line allowed, then anything on following
Of course you end up with a forest of files, and that would be a pain to
manually edit, but provided the categorization in pg_settings, it seems easy
enough to automatically transform postgresql.conf to the 'forest', so there
could be some way for the DBA to say he wont ever want resort to automatic
configuration handling. Then postgresql.conf is the edited file and reload
will have PostgreSQL generate the forest before to use it.
Hope this helps,
In response to
pgsql-hackers by date
|Next:||From: Sergey E. Koposov||Date: 2008-02-20 10:39:13|
|Subject: failed assertion in toasting code|
|Previous:||From: Dimitri Fontaine||Date: 2008-02-20 09:37:43|
|Subject: Re: longest prefix match|