> All I see here is an arbitrary break with our past practice.  I do
> not see any net improvement.

<FreeBSD Port Maintainer>
Well, given that there's a trend to make PostgreSQL more usable, I can
say with absolute certainty, that an FAQ that I get about once a week
is (and granted only from new users) "where is the postgresql.conf?  I
don't see it in ${LOCALBASE}/etc/."  PostgreSQL is one of a few ports
in an extreme minority that uses a local configuration directive and
it violates the policy of least surprise for sysadmins.

PS LOCALBASE/PREFIX is /usr/local 99.999% of the time
</FreeBSD Port Maintainer>

With my DBA hat on, however, here are a few reasons that I'd like to
see the conf moved out of the data directory:

1) pg_dumpall > foo && rm -rf $PGDATA && initdb

   As a DBA I don't have to worry about backing up my config file when
   doing upgrades since the config file is located in an external

2) Backing up config files in ${LOCALBASE}/etc is a pretty common
   practice.  Having to make a special case for postgresql's kind of a


1) gmake install installs a default configuration file in
   ${LOCALBASE}/etc/postgresql.conf.default.  Promote that DBAs should
   diff postgresql.conf.default with postgresql.conf and make
   adjustments as they see fit, but gmake install will _not_, under
   any circumstances, touch postgresql.conf (by default, it should cp
   postgresql.conf.default to postgresql.conf that way things "just
   work" out of the box).

2) Leave the current functionality in place.  Being able to have
   multiple databases on the same machine is a _really_ nice feature
   of PostgreSQL.  If you want multiple databases, having the config
   file in $PGDATA makes some sense because with multiple
   installations, you want to keep everything together... though it
   doesn't make much sense if you have only one installation per
   server... and really, the only reason to have multiple
   installations is to handle username collisions (hint hint).

3) In the absence of a PGDATA environment variable (don't want to
   break backward compatible installations) being set, the future
   behavior allow for a default location of a config file (if no CLI
   switch is specified for an explicit location) that points to a
   config file.  The path would be ${PREFIX}/etc and would provide
   most admins with a standard launching off point for running/tuning
   their databases.  The config file would have to specify the data
   directory as well as the path to the hba.conf, which should be
   outside of the datadir as well (speaking of the hba.conf, am I the
   only one who things that hba.conf should be converted into a system
   catalog?  ::shrug::)

Just some random thoughts from someone who's had to deal with this on
all of the mentioned levels (new users, single installations, multiple
installations, and multiple copies running via daemontools). -sc

PS If there is no huge press for this, I should have the time do do
this in a few weeks if someone doesn't beat me to it.

Sean Chittenden

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?


Reply via email to