Re: location of the configuration files - Mailing list pgsql-hackers
| From | Sean Chittenden |
|---|---|
| Subject | Re: location of the configuration files |
| Date | |
| Msg-id | 20030213220625.GI26484@perrin.int.nxad.com Whole thread Raw |
| In response to | Re: location of the configuration files (Tom Lane <tgl@sss.pgh.pa.us>) |
| List | pgsql-hackers |
> 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
inan external directory.
2) Backing up config files in ${LOCALBASE}/etc is a pretty common practice. Having to make a special case for
postgresql'skind of a PITA.
Suggestions:
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.confthat 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_
nicefeature of PostgreSQL. If you want multiple databases, having the config file in $PGDATA makes some sense
becausewith multiple installations, you want to keep everything together... though it doesn't make much sense if you
haveonly one installation per server... and really, the only reason to have multiple installations is to handle
usernamecollisions (hint hint).
3) In the absence of a PGDATA environment variable (don't want to break backward compatible installations) being set,
thefuture 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
launchingoff point for running/tuning their databases. The config file would have to specify the data directory as
wellas the path to the hba.conf, which should be outside of the datadir as well (speaking of the hba.conf, am I the
onlyone 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
pgsql-hackers by date: