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

Re: Parsing config files in a directory

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Greg Smith <gsmith(at)gregsmith(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, 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-29 11:49:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, 2009-10-28 at 09:39 -0700, Greg Stark wrote:
> On Wed, Oct 28, 2009 at 7:33 AM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
> > Greg Smith escribió:
> >
> >> This sounds familiar...oh, that's right, this is almost the same
> >> algorithm pgtune uses.  And it sucks,
> It's also a blatant violation of packaging rules for Debian if not
> every distribution. If you edit the user's configuration file then
> there's no way to install a modified default configuration file. You
> can't tell the automatic modifications apart from the user's
> modifications. So the user will get a prompt asking if he wants the
> new config file or to keep his modifications which he never remembered
> making.

This is not quite accurate.  What the Debian policy says is that local
changes to configuration files must be preserved during package
upgrades.  You are free to implement this in a variety of ways.  One way
to do it is to mark the file a "conffile" with dpkg, and then dpkg will
handle the upgrades.  If you mark a configuration file a "conffile",
then packages' maintainer scripts are not allowed to touch the file
(because dpkg handles it).

But this is irrelevant for the postgresql package, because
postgresql.conf is not a conffile, primarily because it is created by
the postgresql package's maintainer script in the first place (via

Moreover, it is not illegal for a program or a routine that is
explicitly invoked by a user to modify a configuration file (or a
"conffile" even).  The only policy is again packages' maintainer scripts
(preinst, postint, prerm, postrm, for those reading along) modifying
"conffiles" *automatically* during package installation or removal.

So from a Debian packaging policy point of view, none of the schemes
described so far appear to be disallowed outright.

In response to

pgsql-hackers by date

Next:From: Cédric VillemainDate: 2009-10-29 11:55:08
Subject: Re: Parsing config files in a directory
Previous:From: Peter EisentrautDate: 2009-10-29 11:25:21
Subject: Re: Parsing config files in a directory

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